tactic
stringlengths 1
5.59k
| name
stringlengths 1
85
| haveDraft
stringlengths 1
44.5k
| goal
stringlengths 7
64.3k
|
|---|---|---|---|
of_symm_smul,
|
this
|
(aeval a : R[X] → A) X • ((of R M a).symm : AEval R M a → M) m = a • ((of R M a).symm : AEval R M a → M) m
|
R : Type u_1
A : Type u_3
M : Type u_2
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
a : A
inst✝⁴ : Algebra R A
inst✝³ : AddCommMonoid M
inst✝² : Module A M
inst✝¹ : Module R M
inst✝ : IsScalarTower R A M
m : AEval R M a
⊢ ((of R M a).symm : AEval R M a → M) (X • m) = a • ((of R M a).symm : AEval R M a → M) m
|
aeval_X
|
aeval_X
|
a • ((of R M a).symm : AEval R M a → M) m = a • ((of R M a).symm : AEval R M a → M) m
|
R : Type u_1
A : Type u_3
M : Type u_2
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
a : A
inst✝⁴ : Algebra R A
inst✝³ : AddCommMonoid M
inst✝² : Module A M
inst✝¹ : Module R M
inst✝ : IsScalarTower R A M
m : AEval R M a
⊢ (aeval a : R[X] → A) X • ((of R M a).symm : AEval R M a → M) m = a • ((of R M a).symm : AEval R M a → M) m
|
apply (of R M a).symm.injective
|
a
|
((of R M a).symm : AEval R M a → M) ((r • f) • m) = ((of R M a).symm : AEval R M a → M) (r • f • m)
|
R : Type u_1
A : Type u_3
M : Type u_2
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
a : A
inst✝⁴ : Algebra R A
inst✝³ : AddCommMonoid M
inst✝² : Module A M
inst✝¹ : Module R M
inst✝ : IsScalarTower R A M
r : R
f : R[X]
m : AEval R M a
⊢ (r • f) • m = r • f • m
|
of_symm_smul,
|
a
|
(aeval a : R[X] → A) (r • f) • ((of R M a).symm : AEval R M a → M) m = ((of R M a).symm : AEval R M a → M) (r • f • m)
|
R : Type u_1
A : Type u_3
M : Type u_2
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
a : A
inst✝⁴ : Algebra R A
inst✝³ : AddCommMonoid M
inst✝² : Module A M
inst✝¹ : Module R M
inst✝ : IsScalarTower R A M
r : R
f : R[X]
m : AEval R M a
⊢ ((of R M a).symm : AEval R M a → M) ((r • f) • m) = ((of R M a).symm : AEval R M a → M) (r • f • m)
|
map_smul,
|
a
|
(r • (aeval a : R[X] → A) f) • ((of R M a).symm : AEval R M a → M) m = ((of R M a).symm : AEval R M a → M) (r • f • m)
|
R : Type u_1
A : Type u_3
M : Type u_2
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
a : A
inst✝⁴ : Algebra R A
inst✝³ : AddCommMonoid M
inst✝² : Module A M
inst✝¹ : Module R M
inst✝ : IsScalarTower R A M
r : R
f : R[X]
m : AEval R M a
⊢ (aeval a : R[X] → A) (r • f) • ((of R M a).symm : AEval R M a → M) m = ((of R M a).symm : AEval R M a → M) (r • f • m)
|
smul_assoc,
|
a
|
r • (aeval a : R[X] → A) f • ((of R M a).symm : AEval R M a → M) m = ((of R M a).symm : AEval R M a → M) (r • f • m)
|
R : Type u_1
A : Type u_3
M : Type u_2
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
a : A
inst✝⁴ : Algebra R A
inst✝³ : AddCommMonoid M
inst✝² : Module A M
inst✝¹ : Module R M
inst✝ : IsScalarTower R A M
r : R
f : R[X]
m : AEval R M a
⊢ (r • (aeval a : R[X] → A) f) • ((of R M a).symm : AEval R M a → M) m = ((of R M a).symm : AEval R M a → M) (r • f • m)
|
map_smul,
|
a
|
r • (aeval a : R[X] → A) f • ((of R M a).symm : AEval R M a → M) m = r • ((of R M a).symm : AEval R M a → M) (f • m)
|
R : Type u_1
A : Type u_3
M : Type u_2
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
a : A
inst✝⁴ : Algebra R A
inst✝³ : AddCommMonoid M
inst✝² : Module A M
inst✝¹ : Module R M
inst✝ : IsScalarTower R A M
r : R
f : R[X]
m : AEval R M a
⊢ r • (aeval a : R[X] → A) f • ((of R M a).symm : AEval R M a → M) m = ((of R M a).symm : AEval R M a → M) (r • f • m)
|
of_symm_smul
|
a
|
r • (aeval a : R[X] → A) f • ((of R M a).symm : AEval R M a → M) m =
r • (aeval a : R[X] → A) f • ((of R M a).symm : AEval R M a → M) m
|
R : Type u_1
A : Type u_3
M : Type u_2
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
a : A
inst✝⁴ : Algebra R A
inst✝³ : AddCommMonoid M
inst✝² : Module A M
inst✝¹ : Module R M
inst✝ : IsScalarTower R A M
r : R
f : R[X]
m : AEval R M a
⊢ r • (aeval a : R[X] → A) f • ((of R M a).symm : AEval R M a → M) m = r • ((of R M a).symm : AEval R M a → M) (f • m)
|
simp_rw [RingHom.id_apply, AddHom.toFun_eq_coe, LinearMap.coe_toAddHom,
LinearMap.comp_apply, LinearEquiv.coe_toLinearMap] at h ⊢
|
simp_rw
|
(f : M → N) (((of R M a).symm : AEval R M a → M) (((C : R → R[X]) k * X ^ (n + 1)) • m)) =
((C : R → R[X]) k * X ^ (n + 1)) • (f : M → N) (((of R M a).symm : AEval R M a → M) m)
|
R : Type u_1
A : Type u_2
M : Type u_3
inst✝¹⁰ : CommSemiring R
inst✝⁹ : Semiring A
a : A
inst✝⁸ : Algebra R A
inst✝⁷ : AddCommMonoid M
inst✝⁶ : Module A M
inst✝⁵ : Module R M
inst✝⁴ : IsScalarTower R A M
N : Type u_4
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : Module R[X] N
inst✝ : IsScalarTower R R[X] N
f : M →ₗ[R] N
hf : ∀ (m : M), (f : M → N) (a • m) = X • (f : M → N) m
p : R[X]
n : ℕ
k : R
h :
∀ (x : AEval R M a),
(f ∘ₗ (↑(of R M a).symm : AEval R M a →ₗ[R] M)).toFun (((C : R → R[X]) k * X ^ n) • x) =
(RingHom.id R[X] : R[X] → R[X]) ((C : R → R[X]) k * X ^ n) •
(f ∘ₗ (↑(of R M a).symm : AEval R M a →ₗ[R] M)).toFun x
m : AEval R M a
⊢ (f ∘ₗ (↑(of R M a).symm : AEval R M a →ₗ[R] M)).toFun (((C : R → R[X]) k * X ^ (n + 1)) • m) =
(RingHom.id R[X] : R[X] → R[X]) ((C : R → R[X]) k * X ^ (n + 1)) •
(f ∘ₗ (↑(of R M a).symm : AEval R M a →ₗ[R] M)).toFun m
|
ext p
|
h
|
p ∈ annihilator R[X] (AEval R M a) ↔ p ∈ RingHom.ker (aeval a)
|
R : Type u_3
A : Type u_1
M : Type u_2
inst✝⁷ : CommSemiring R
inst✝⁶ : Semiring A
a : A
inst✝⁵ : Algebra R A
inst✝⁴ : AddCommMonoid M
inst✝³ : Module A M
inst✝² : Module R M
inst✝¹ : IsScalarTower R A M
inst✝ : FaithfulSMul A M
⊢ annihilator R[X] (AEval R M a) = RingHom.ker (aeval a)
|
simp_rw [mem_annihilator, RingHom.mem_ker]
|
h
|
(∀ (m : AEval R M a), p • m = 0) ↔ (aeval a : R[X] → A) p = 0
|
R : Type u_3
A : Type u_1
M : Type u_2
inst✝⁷ : CommSemiring R
inst✝⁶ : Semiring A
a : A
inst✝⁵ : Algebra R A
inst✝⁴ : AddCommMonoid M
inst✝³ : Module A M
inst✝² : Module R M
inst✝¹ : IsScalarTower R A M
inst✝ : FaithfulSMul A M
p : R[X]
⊢ p ∈ annihilator R[X] (AEval R M a) ↔ p ∈ RingHom.ker (aeval a)
|
change (∀ m : M, aeval a p • m = 0) ↔ _
|
h
|
(∀ (m : M), (aeval a : R[X] → A) p • m = 0) ↔ (aeval a : R[X] → A) p = 0
|
R : Type u_3
A : Type u_1
M : Type u_2
inst✝⁷ : CommSemiring R
inst✝⁶ : Semiring A
a : A
inst✝⁵ : Algebra R A
inst✝⁴ : AddCommMonoid M
inst✝³ : Module A M
inst✝² : Module R M
inst✝¹ : IsScalarTower R A M
inst✝ : FaithfulSMul A M
p : R[X]
⊢ (∀ (m : AEval R M a), p • m = 0) ↔ (aeval a : R[X] → A) p = 0
|
ext p
|
h
|
p ∈ ⊤.annihilator ↔ p ∈ RingHom.ker (aeval a)
|
R : Type u_3
A : Type u_1
M : Type u_2
inst✝⁷ : CommSemiring R
inst✝⁶ : Semiring A
a : A
inst✝⁵ : Algebra R A
inst✝⁴ : AddCommMonoid M
inst✝³ : Module A M
inst✝² : Module R M
inst✝¹ : IsScalarTower R A M
inst✝ : FaithfulSMul A M
⊢ ⊤.annihilator = RingHom.ker (aeval a)
|
simp only [Submodule.mem_annihilator, Submodule.mem_top, forall_true_left, RingHom.mem_ker]
|
h
|
(∀ (n : AEval R M a), p • n = 0) ↔ (aeval a : R[X] → A) p = 0
|
R : Type u_3
A : Type u_1
M : Type u_2
inst✝⁷ : CommSemiring R
inst✝⁶ : Semiring A
a : A
inst✝⁵ : Algebra R A
inst✝⁴ : AddCommMonoid M
inst✝³ : Module A M
inst✝² : Module R M
inst✝¹ : IsScalarTower R A M
inst✝ : FaithfulSMul A M
p : R[X]
⊢ p ∈ ⊤.annihilator ↔ p ∈ RingHom.ker (aeval a)
|
change (∀ m : M, aeval a p • m = 0) ↔ _
|
h
|
(∀ (m : M), (aeval a : R[X] → A) p • m = 0) ↔ (aeval a : R[X] → A) p = 0
|
R : Type u_3
A : Type u_1
M : Type u_2
inst✝⁷ : CommSemiring R
inst✝⁶ : Semiring A
a : A
inst✝⁵ : Algebra R A
inst✝⁴ : AddCommMonoid M
inst✝³ : Module A M
inst✝² : Module R M
inst✝¹ : IsScalarTower R A M
inst✝ : FaithfulSMul A M
p : R[X]
⊢ (∀ (n : AEval R M a), p • n = 0) ↔ (aeval a : R[X] → A) p = 0
|
ext
|
a
|
x✝ ∈
(↑((fun q ↦
⟨((Submodule.orderIsoMapComap (of R M a)).symm : Submodule R (AEval R M a) → Submodule R M)
(Submodule.restrictScalars R q),
sorry⟩)
((fun p ↦
let __AddSubmonoid := AddSubmonoid.map (of R M a) (↑p : Submodule R M).toAddSubmonoid;
{ toAddSubmonoid := __AddSubmonoid, smul_mem' := sorry })
p)) :
Submodule R M) ↔
x✝ ∈ (↑p : Submodule R M)
|
R : Type u_1
A : Type u_2
M : Type u_3
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
a : A
inst✝⁴ : Algebra R A
inst✝³ : AddCommMonoid M
inst✝² : Module A M
inst✝¹ : Module R M
inst✝ : IsScalarTower R A M
p : ↥((Algebra.lsmul R R M : A → End R M) a).invtSubmodule
⊢ (fun q ↦
⟨((Submodule.orderIsoMapComap (of R M a)).symm : Submodule R (AEval R M a) → Submodule R M)
(Submodule.restrictScalars R q),
⋯⟩)
((fun p ↦
let __AddSubmonoid := AddSubmonoid.map (of R M a) (↑p : Submodule R M).toAddSubmonoid;
{ toAddSubmonoid := __AddSubmonoid, smul_mem' := ⋯ })
p) =
p
|
ext
|
h
|
x✝ ∈
(fun p ↦
let __AddSubmonoid := AddSubmonoid.map (of R M a) (↑p : Submodule R M).toAddSubmonoid;
{ toAddSubmonoid := __AddSubmonoid, smul_mem' := sorry })
((fun q ↦
⟨((Submodule.orderIsoMapComap (of R M a)).symm : Submodule R (AEval R M a) → Submodule R M)
(Submodule.restrictScalars R q),
sorry⟩)
q) ↔
x✝ ∈ q
|
R : Type u_1
A : Type u_2
M : Type u_3
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
a : A
inst✝⁴ : Algebra R A
inst✝³ : AddCommMonoid M
inst✝² : Module A M
inst✝¹ : Module R M
inst✝ : IsScalarTower R A M
q : Submodule R[X] (AEval R M a)
⊢ (fun p ↦
let __AddSubmonoid := AddSubmonoid.map (of R M a) (↑p : Submodule R M).toAddSubmonoid;
{ toAddSubmonoid := __AddSubmonoid, smul_mem' := ⋯ })
((fun q ↦
⟨((Submodule.orderIsoMapComap (of R M a)).symm : Submodule R (AEval R M a) → Submodule R M)
(Submodule.restrictScalars R q),
⋯⟩)
q) =
q
|
obtain ⟨x, hx⟩ := x
|
mk
|
((of R M a).symm : AEval R M a → M) (↑⟨x, sorry⟩ : AEval R M a) ∈ p
|
R : Type u_1
A : Type u_2
M : Type u_3
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
a : A
inst✝⁴ : Algebra R A
inst✝³ : AddCommMonoid M
inst✝² : Module A M
inst✝¹ : Module R M
inst✝ : IsScalarTower R A M
p : Submodule R M
hp : p ∈ ((Algebra.lsmul R R M : A → End R M) a).invtSubmodule
x :
↥((mapSubmodule R M a : ↥((Algebra.lsmul R R M : A → End R M) a).invtSubmodule → Submodule R[X] (AEval R M a))
⟨p, hp⟩)
⊢ ((of R M a).symm : AEval R M a → M) (↑x : AEval R M a) ∈ p
|
refine (Fintype.truncEquivFinOfCardEq <| Fintype.card_coe s).lift
(fun e ↦ (finAntidiagonal s.card n).map ⟨fun f i ↦ if hi : i ∈ s then f (e ⟨i, hi⟩) else 0, ?_⟩)
fun e₁ e₂ ↦ ?_
|
refine_1
|
Injective fun f i ↦ if hi : i ∈ s then f ((e : { x // x ∈ s } → Fin #s) ⟨i, sorry⟩) else 0
|
ι : Type u_1
μ : Type u_2
μ' : Type u_3
inst✝³ : DecidableEq ι
inst✝² : AddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
n✝ : μ
s : Finset ι
n : μ
⊢ Finset (ι → μ)
|
refine (Fintype.truncEquivFinOfCardEq <| Fintype.card_coe s).lift
(fun e ↦ (finAntidiagonal s.card n).map ⟨fun f i ↦ if hi : i ∈ s then f (e ⟨i, hi⟩) else 0, ?_⟩)
fun e₁ e₂ ↦ ?_
|
refine_2
|
(fun e ↦
map { toFun := fun f i ↦ if hi : i ∈ s then f ((e : { x // x ∈ s } → Fin #s) ⟨i, sorry⟩) else 0, inj' := sorry }
(finAntidiagonal (#s) n))
e₁ =
(fun e ↦
map { toFun := fun f i ↦ if hi : i ∈ s then f ((e : { x // x ∈ s } → Fin #s) ⟨i, sorry⟩) else 0, inj' := sorry }
(finAntidiagonal (#s) n))
e₂
|
ι : Type u_1
μ : Type u_2
μ' : Type u_3
inst✝³ : DecidableEq ι
inst✝² : AddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
n✝ : μ
s : Finset ι
n : μ
refine_1 : Injective fun f i ↦ if hi : i ∈ s then f ((_fvar.12352 : { x // x ∈ s } → Fin #s) ⟨i, hi⟩) else 0
⊢ Finset (ι → μ)
|
ext i
|
refine_1
|
f i = g i
|
ι : Type u_1
μ : Type u_2
μ' : Type u_3
inst✝³ : DecidableEq ι
inst✝² : AddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
n✝ : μ
s : Finset ι
n : μ
e : { x // x ∈ s } ≃ Fin #s
f g : Fin #s → μ
hfg :
(fun f i ↦ if hi : i ∈ s then f ((e : { x // x ∈ s } → Fin #s) ⟨i, hi⟩) else 0) f =
(fun f i ↦ if hi : i ∈ s then f ((e : { x // x ∈ s } → Fin #s) ⟨i, hi⟩) else 0) g
⊢ f = g
|
ext f
|
refine_2
|
f ∈
(fun e ↦
map { toFun := fun f i ↦ if hi : i ∈ s then f ((e : { x // x ∈ s } → Fin #s) ⟨i, sorry⟩) else 0, inj' := sorry }
(finAntidiagonal (#s) n))
e₁ ↔
f ∈
(fun e ↦
map { toFun := fun f i ↦ if hi : i ∈ s then f ((e : { x // x ∈ s } → Fin #s) ⟨i, sorry⟩) else 0, inj' := sorry }
(finAntidiagonal (#s) n))
e₂
|
ι : Type u_1
μ : Type u_2
μ' : Type u_3
inst✝³ : DecidableEq ι
inst✝² : AddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
n✝ : μ
s : Finset ι
n : μ
e₁ e₂ : { x // x ∈ s } ≃ Fin #s
⊢ (fun e ↦
map { toFun := fun f i ↦ if hi : i ∈ s then f ((e : { x // x ∈ s } → Fin #s) ⟨i, hi⟩) else 0, inj' := ⋯ }
(finAntidiagonal (#s) n))
e₁ =
(fun e ↦
map { toFun := fun f i ↦ if hi : i ∈ s then f ((e : { x // x ∈ s } → Fin #s) ⟨i, hi⟩) else 0, inj' := ⋯ }
(finAntidiagonal (#s) n))
e₂
|
simp only [mem_map, mem_finAntidiagonal]
|
refine_2
|
(∃ a,
∑ i, a i = n ∧
({ toFun := fun f i ↦ if hi : i ∈ s then f ((e₁ : { x // x ∈ s } → Fin #s) ⟨i, sorry⟩) else 0, inj' := sorry } :
(Fin #s → μ) → ι → μ)
a =
f) ↔
∃ a,
∑ i, a i = n ∧
({ toFun := fun f i ↦ if hi : i ∈ s then f ((e₂ : { x // x ∈ s } → Fin #s) ⟨i, sorry⟩) else 0, inj' := sorry } :
(Fin #s → μ) → ι → μ)
a =
f
|
ι : Type u_1
μ : Type u_2
μ' : Type u_3
inst✝³ : DecidableEq ι
inst✝² : AddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
n✝ : μ
s : Finset ι
n : μ
e₁ e₂ : { x // x ∈ s } ≃ Fin #s
f : ι → μ
⊢ f ∈
(fun e ↦
map { toFun := fun f i ↦ if hi : i ∈ s then f ((e : { x // x ∈ s } → Fin #s) ⟨i, hi⟩) else 0, inj' := ⋯ }
(finAntidiagonal (#s) n))
e₁ ↔
f ∈
(fun e ↦
map { toFun := fun f i ↦ if hi : i ∈ s then f ((e : { x // x ∈ s } → Fin #s) ⟨i, hi⟩) else 0, inj' := ⋯ }
(finAntidiagonal (#s) n))
e₂
|
refine Equiv.exists_congr ((e₁.symm.trans e₂).arrowCongr <| .refl _) fun g ↦ ?_
|
refine_2
|
∑ i, g i = n ∧
({ toFun := fun f i ↦ if hi : i ∈ s then f ((e₁ : { x // x ∈ s } → Fin #s) ⟨i, sorry⟩) else 0, inj' := sorry } :
(Fin #s → μ) → ι → μ)
g =
f ↔
∑ i, ((e₁.symm.trans e₂).arrowCongr (Equiv.refl μ) : (Fin #s → μ) → Fin #s → μ) g i = n ∧
({ toFun := fun f i ↦ if hi : i ∈ s then f ((e₂ : { x // x ∈ s } → Fin #s) ⟨i, sorry⟩) else 0, inj' := sorry } :
(Fin #s → μ) → ι → μ)
(((e₁.symm.trans e₂).arrowCongr (Equiv.refl μ) : (Fin #s → μ) → Fin #s → μ) g) =
f
|
ι : Type u_1
μ : Type u_2
μ' : Type u_3
inst✝³ : DecidableEq ι
inst✝² : AddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
n✝ : μ
s : Finset ι
n : μ
e₁ e₂ : { x // x ∈ s } ≃ Fin #s
f : ι → μ
⊢ (∃ a,
∑ i, a i = n ∧
({ toFun := fun f i ↦ if hi : i ∈ s then f ((e₁ : { x // x ∈ s } → Fin #s) ⟨i, hi⟩) else 0, inj' := ⋯ } :
(Fin #s → μ) → ι → μ)
a =
f) ↔
∃ a,
∑ i, a i = n ∧
({ toFun := fun f i ↦ if hi : i ∈ s then f ((e₂ : { x // x ∈ s } → Fin #s) ⟨i, hi⟩) else 0, inj' := ⋯ } :
(Fin #s → μ) → ι → μ)
a =
f
|
have := Fintype.sum_equiv (e₂.symm.trans e₁) _ g fun _ ↦ rfl
|
refine_2
|
∑ i, g i = n ∧
({ toFun := fun f i ↦ if hi : i ∈ s then f ((e₁ : { x // x ∈ s } → Fin #s) ⟨i, sorry⟩) else 0, inj' := sorry } :
(Fin #s → μ) → ι → μ)
g =
f ↔
∑ i, ((e₁.symm.trans e₂).arrowCongr (Equiv.refl μ) : (Fin #s → μ) → Fin #s → μ) g i = n ∧
({ toFun := fun f i ↦ if hi : i ∈ s then f ((e₂ : { x // x ∈ s } → Fin #s) ⟨i, sorry⟩) else 0, inj' := sorry } :
(Fin #s → μ) → ι → μ)
(((e₁.symm.trans e₂).arrowCongr (Equiv.refl μ) : (Fin #s → μ) → Fin #s → μ) g) =
f
|
ι : Type u_1
μ : Type u_2
μ' : Type u_3
inst✝³ : DecidableEq ι
inst✝² : AddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
n✝ : μ
s : Finset ι
n : μ
e₁ e₂ : { x // x ∈ s } ≃ Fin #s
f : ι → μ
g : Fin #s → μ
⊢ ∑ i, g i = n ∧
({ toFun := fun f i ↦ if hi : i ∈ s then f ((e₁ : { x // x ∈ s } → Fin #s) ⟨i, hi⟩) else 0, inj' := ⋯ } :
(Fin #s → μ) → ι → μ)
g =
f ↔
∑ i, ((e₁.symm.trans e₂).arrowCongr (Equiv.refl μ) : (Fin #s → μ) → Fin #s → μ) g i = n ∧
({ toFun := fun f i ↦ if hi : i ∈ s then f ((e₂ : { x // x ∈ s } → Fin #s) ⟨i, hi⟩) else 0, inj' := ⋯ } :
(Fin #s → μ) → ι → μ)
(((e₁.symm.trans e₂).arrowCongr (Equiv.refl μ) : (Fin #s → μ) → Fin #s → μ) g) =
f
|
induction' Fintype.truncEquivFinOfCardEq (Fintype.card_coe s) using Trunc.ind with e
|
a
|
f ∈
Trunc.lift
(fun e ↦
map { toFun := fun f i ↦ if hi : i ∈ s then f ((e : { x // x ∈ s } → Fin #s) ⟨i, sorry⟩) else 0, inj' := sorry }
(finAntidiagonal (#s) n))
sorry (Trunc.mk e) ↔
s.sum f = n ∧ ∀ (i : ι), f i ≠ 0 → i ∈ s
|
ι : Type u_1
μ : Type u_2
inst✝³ : DecidableEq ι
inst✝² : AddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
s : Finset ι
n : μ
f : ι → μ
⊢ f ∈
Trunc.lift
(fun e ↦
map { toFun := fun f i ↦ if hi : i ∈ s then f ((e : { x // x ∈ s } → Fin #s) ⟨i, hi⟩) else 0, inj' := ⋯ }
(finAntidiagonal (#s) n))
⋯ (Fintype.truncEquivFinOfCardEq ⋯) ↔
s.sum f = n ∧ ∀ (i : ι), f i ≠ 0 → i ∈ s
|
simp only [Trunc.lift_mk, mem_map, mem_finAntidiagonal, Embedding.coeFn_mk]
|
a
|
(∃ a, ∑ i, a i = n ∧ (fun i ↦ if hi : i ∈ s then a ((e : { x // x ∈ s } → Fin #s) ⟨i, sorry⟩) else 0) = f) ↔
s.sum f = n ∧ ∀ (i : ι), f i ≠ 0 → i ∈ s
|
ι : Type u_1
μ : Type u_2
inst✝³ : DecidableEq ι
inst✝² : AddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
s : Finset ι
n : μ
f : ι → μ
e : { x // x ∈ s } ≃ Fin #s
⊢ f ∈
Trunc.lift
(fun e ↦
map { toFun := fun f i ↦ if hi : i ∈ s then f ((e : { x // x ∈ s } → Fin #s) ⟨i, hi⟩) else 0, inj' := ⋯ }
(finAntidiagonal (#s) n))
⋯ (Trunc.mk e) ↔
s.sum f = n ∧ ∀ (i : ι), f i ≠ 0 → i ∈ s
|
constructor
|
a
|
(∃ a, ∑ i, a i = n ∧ (fun i ↦ if hi : i ∈ s then a ((e : { x // x ∈ s } → Fin #s) ⟨i, sorry⟩) else 0) = f) →
s.sum f = n ∧ ∀ (i : ι), f i ≠ 0 → i ∈ s
|
ι : Type u_1
μ : Type u_2
inst✝³ : DecidableEq ι
inst✝² : AddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
s : Finset ι
n : μ
f : ι → μ
e : { x // x ∈ s } ≃ Fin #s
⊢ (∃ a, ∑ i, a i = n ∧ (fun i ↦ if hi : i ∈ s then a ((e : { x // x ∈ s } → Fin #s) ⟨i, hi⟩) else 0) = f) ↔
s.sum f = n ∧ ∀ (i : ι), f i ≠ 0 → i ∈ s
|
constructor
|
a
|
(s.sum f = n ∧ ∀ (i : ι), f i ≠ 0 → i ∈ s) →
∃ a, ∑ i, a i = n ∧ (fun i ↦ if hi : i ∈ s then a ((e : { x // x ∈ s } → Fin #s) ⟨i, sorry⟩) else 0) = f
|
ι : Type u_1
μ : Type u_2
inst✝³ : DecidableEq ι
inst✝² : AddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
s : Finset ι
n : μ
f : ι → μ
e : { x // x ∈ s } ≃ Fin #s
a : (∃ a, ∑ i, a i = n ∧ (fun i ↦ if hi : i ∈ s then a ((e : { x // x ∈ s } → Fin #s) ⟨i, hi⟩) else 0) = f) →
s.sum f = n ∧ ∀ (i : ι), f i ≠ 0 → i ∈ s
⊢ (∃ a, ∑ i, a i = n ∧ (fun i ↦ if hi : i ∈ s then a ((e : { x // x ∈ s } → Fin #s) ⟨i, hi⟩) else 0) = f) ↔
s.sum f = n ∧ ∀ (i : ι), f i ≠ 0 → i ∈ s
|
refine ⟨f ∘ (↑) ∘ e.symm, ?_, by ext i; have := not_imp_comm.1 (hf i); aesop⟩
|
a
|
∑ i, (f ∘ Subtype.val ∘ (⇑e.symm : Fin #s → { x // x ∈ s })) i = s.sum f
|
ι : Type u_1
μ : Type u_2
inst✝³ : DecidableEq ι
inst✝² : AddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
s : Finset ι
f : ι → μ
e : { x // x ∈ s } ≃ Fin #s
hf : ∀ (i : ι), f i ≠ 0 → i ∈ s
⊢ ∃ a, ∑ i, a i = s.sum f ∧ (fun i ↦ if hi : i ∈ s then a ((e : { x // x ∈ s } → Fin #s) ⟨i, hi⟩) else 0) = f
|
ext i
|
h
|
(if hi : i ∈ s then (f ∘ Subtype.val ∘ (⇑e.symm : Fin #s → { x // x ∈ s })) ((e : { x // x ∈ s } → Fin #s) ⟨i, sorry⟩)
else 0) =
f i
|
ι : Type u_1
μ : Type u_2
inst✝³ : DecidableEq ι
inst✝² : AddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
s : Finset ι
f : ι → μ
e : { x // x ∈ s } ≃ Fin #s
hf : ∀ (i : ι), f i ≠ 0 → i ∈ s
⊢ (fun i ↦
if hi : i ∈ s then (f ∘ Subtype.val ∘ (⇑e.symm : Fin #s → { x // x ∈ s })) ((e : { x // x ∈ s } → Fin #s) ⟨i, hi⟩)
else 0) =
f
|
have := not_imp_comm.1 (hf i)
|
h
|
(if hi : i ∈ s then (f ∘ Subtype.val ∘ (⇑e.symm : Fin #s → { x // x ∈ s })) ((e : { x // x ∈ s } → Fin #s) ⟨i, sorry⟩)
else 0) =
f i
|
ι : Type u_1
μ : Type u_2
inst✝³ : DecidableEq ι
inst✝² : AddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
s : Finset ι
f : ι → μ
e : { x // x ∈ s } ≃ Fin #s
hf : ∀ (i : ι), f i ≠ 0 → i ∈ s
i : ι
⊢ (if hi : i ∈ s then (f ∘ Subtype.val ∘ (⇑e.symm : Fin #s → { x // x ∈ s })) ((e : { x // x ∈ s } → Fin #s) ⟨i, hi⟩)
else 0) =
f i
|
rw [← sum_attach s]
|
a
|
∑ i, (f ∘ Subtype.val ∘ (⇑e.symm : Fin #s → { x // x ∈ s })) i = ∑ x ∈ s.attach, f (↑x : ι)
|
ι : Type u_1
μ : Type u_2
inst✝³ : DecidableEq ι
inst✝² : AddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
s : Finset ι
f : ι → μ
e : { x // x ∈ s } ≃ Fin #s
hf : ∀ (i : ι), f i ≠ 0 → i ∈ s
⊢ ∑ i, (f ∘ Subtype.val ∘ (⇑e.symm : Fin #s → { x // x ∈ s })) i = s.sum f
|
← sum_attach s
|
a
|
∑ i, (f ∘ Subtype.val ∘ (⇑e.symm : Fin #s → { x // x ∈ s })) i = ∑ x ∈ s.attach, f (↑x : ι)
|
ι : Type u_1
μ : Type u_2
inst✝³ : DecidableEq ι
inst✝² : AddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
s : Finset ι
f : ι → μ
e : { x // x ∈ s } ≃ Fin #s
hf : ∀ (i : ι), f i ≠ 0 → i ∈ s
⊢ ∑ i, (f ∘ Subtype.val ∘ (⇑e.symm : Fin #s → { x // x ∈ s })) i = s.sum f
|
ext
|
h
|
a✝ ∈ ∅.piAntidiag 0 ↔ a✝ ∈ {0}
|
ι : Type u_1
μ : Type u_2
inst✝³ : DecidableEq ι
inst✝² : AddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
⊢ ∅.piAntidiag 0 = {0}
|
ext f
|
h
|
f ∈ (cons i s sorry).piAntidiag n ↔
f ∈
(antidiagonal n).disjiUnion (fun p ↦ map (addRightEmbedding fun t ↦ if t = i then p.1 else 0) (s.piAntidiag p.2))
sorry
|
ι : Type u_1
μ : Type u_2
inst✝³ : DecidableEq ι
inst✝² : AddCancelCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
i : ι
s : Finset ι
hi : i ∉ s
n : μ
⊢ (cons i s hi).piAntidiag n =
(antidiagonal n).disjiUnion (fun p ↦ map (addRightEmbedding fun t ↦ if t = i then p.1 else 0) (s.piAntidiag p.2)) ⋯
|
simp only [mem_piAntidiag, sum_cons, ne_eq, mem_cons, mem_disjiUnion, mem_antidiagonal, mem_map,
addLeftEmbedding_apply, Prod.exists]
|
h
|
(f i + ∑ x ∈ s, f x = n ∧ ∀ (i_1 : ι), ¬f i_1 = 0 → i_1 = i ∨ i_1 ∈ s) ↔
∃ a b,
a + b = n ∧
∃ a_1,
(s.sum a_1 = b ∧ ∀ (i : ι), ¬a_1 i = 0 → i ∈ s) ∧
(addRightEmbedding fun t ↦ if t = i then a else 0 : (ι → μ) → ι → μ) a_1 = f
|
ι : Type u_1
μ : Type u_2
inst✝³ : DecidableEq ι
inst✝² : AddCancelCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
i : ι
s : Finset ι
hi : i ∉ s
n : μ
f : ι → μ
⊢ f ∈ (cons i s hi).piAntidiag n ↔
f ∈
(antidiagonal n).disjiUnion (fun p ↦ map (addRightEmbedding fun t ↦ if t = i then p.1 else 0) (s.piAntidiag p.2))
⋯
|
constructor
|
h
|
(f i + ∑ x ∈ s, f x = n ∧ ∀ (i_1 : ι), ¬f i_1 = 0 → i_1 = i ∨ i_1 ∈ s) →
∃ a b,
a + b = n ∧
∃ a_1,
(s.sum a_1 = b ∧ ∀ (i : ι), ¬a_1 i = 0 → i ∈ s) ∧
(addRightEmbedding fun t ↦ if t = i then a else 0 : (ι → μ) → ι → μ) a_1 = f
|
ι : Type u_1
μ : Type u_2
inst✝³ : DecidableEq ι
inst✝² : AddCancelCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
i : ι
s : Finset ι
hi : i ∉ s
n : μ
f : ι → μ
⊢ (f i + ∑ x ∈ s, f x = n ∧ ∀ (i_1 : ι), ¬f i_1 = 0 → i_1 = i ∨ i_1 ∈ s) ↔
∃ a b,
a + b = n ∧
∃ a_1,
(s.sum a_1 = b ∧ ∀ (i : ι), ¬a_1 i = 0 → i ∈ s) ∧
(addRightEmbedding fun t ↦ if t = i then a else 0 : (ι → μ) → ι → μ) a_1 = f
|
constructor
|
h
|
(∃ a b,
a + b = n ∧
∃ a_1,
(s.sum a_1 = b ∧ ∀ (i : ι), ¬a_1 i = 0 → i ∈ s) ∧
(addRightEmbedding fun t ↦ if t = i then a else 0 : (ι → μ) → ι → μ) a_1 = f) →
f i + ∑ x ∈ s, f x = n ∧ ∀ (i_1 : ι), ¬f i_1 = 0 → i_1 = i ∨ i_1 ∈ s
|
ι : Type u_1
μ : Type u_2
inst✝³ : DecidableEq ι
inst✝² : AddCancelCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
i : ι
s : Finset ι
hi : i ∉ s
n : μ
f : ι → μ
h : (f i + ∑ x ∈ s, f x = n ∧ ∀ (i_1 : ι), ¬f i_1 = 0 → i_1 = i ∨ i_1 ∈ s) →
∃ a b,
a + b = n ∧
∃ a_1,
(s.sum a_1 = b ∧ ∀ (i : ι), ¬a_1 i = 0 → i ∈ s) ∧
(addRightEmbedding fun t ↦ if t = i then a else 0 : (ι → μ) → ι → μ) a_1 = f
⊢ (f i + ∑ x ∈ s, f x = n ∧ ∀ (i_1 : ι), ¬f i_1 = 0 → i_1 = i ∨ i_1 ∈ s) ↔
∃ a b,
a + b = n ∧
∃ a_1,
(s.sum a_1 = b ∧ ∀ (i : ι), ¬a_1 i = 0 → i ∈ s) ∧
(addRightEmbedding fun t ↦ if t = i then a else 0 : (ι → μ) → ι → μ) a_1 = f
|
refine ⟨_, _, hn, update f i 0, ⟨sum_update_of_notMem hi _ _, fun j ↦ ?_⟩, by aesop⟩
|
h
|
¬update f i 0 j = 0 → j ∈ s
|
ι : Type u_1
μ : Type u_2
inst✝³ : DecidableEq ι
inst✝² : AddCancelCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
i : ι
s : Finset ι
hi : i ∉ s
n : μ
f : ι → μ
hn : f i + ∑ x ∈ s, f x = n
hf : ∀ (i_1 : ι), ¬f i_1 = 0 → i_1 = i ∨ i_1 ∈ s
⊢ ∃ a b,
a + b = n ∧
∃ a_1,
(s.sum a_1 = b ∧ ∀ (i : ι), ¬a_1 i = 0 → i ∈ s) ∧
(addRightEmbedding fun t ↦ if t = i then a else 0 : (ι → μ) → ι → μ) a_1 = f
|
have := fun h₁ h₂ ↦ (hf j h₁).resolve_left h₂
|
h
|
¬update f i 0 j = 0 → j ∈ s
|
ι : Type u_1
μ : Type u_2
inst✝³ : DecidableEq ι
inst✝² : AddCancelCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
i : ι
s : Finset ι
hi : i ∉ s
n : μ
f : ι → μ
hn : f i + ∑ x ∈ s, f x = n
hf : ∀ (i_1 : ι), ¬f i_1 = 0 → i_1 = i ∨ i_1 ∈ s
j : ι
⊢ ¬update f i 0 j = 0 → j ∈ s
|
ext
|
h
|
a✝ ∈ s.piAntidiag 0 ↔ a✝ ∈ {0}
|
ι : Type u_1
μ : Type u_2
inst✝⁵ : DecidableEq ι
inst✝⁴ : AddCommMonoid μ
inst✝³ : PartialOrder μ
inst✝² : CanonicallyOrderedAdd μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
s : Finset ι
⊢ s.piAntidiag 0 = {0}
|
ext
|
h
|
a✝ ∈ univ.piAntidiag n ↔ a✝ ∈ Nat.antidiagonalTuple k n
|
n k : ℕ
⊢ univ.piAntidiag n = Nat.antidiagonalTuple k n
|
ext f
|
h
|
f ∈ SMul.smul n (s.piAntidiag m) ↔ f ∈ {f ∈ s.piAntidiag (n * m) | ∀ i ∈ s, n ∣ f i}
|
ι : Type u_1
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq (ι → ℕ)
s : Finset ι
m n : ℕ
hn : n ≠ 0
⊢ SMul.smul n (s.piAntidiag m) = {f ∈ s.piAntidiag (n * m) | ∀ i ∈ s, n ∣ f i}
|
refine mem_smul_finset.trans ?_
|
h
|
(∃ y ∈ s.piAntidiag m, n • y = f) ↔ f ∈ {f ∈ s.piAntidiag (n * m) | ∀ i ∈ s, n ∣ f i}
|
ι : Type u_1
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq (ι → ℕ)
s : Finset ι
m n : ℕ
hn : n ≠ 0
f : ι → ℕ
⊢ f ∈ SMul.smul n (s.piAntidiag m) ↔ f ∈ {f ∈ s.piAntidiag (n * m) | ∀ i ∈ s, n ∣ f i}
|
simp only [mem_smul_finset, mem_filter, mem_piAntidiag, Function.Embedding.coeFn_mk, exists_prop,
and_assoc]
|
h
|
(∃ y, s.sum y = m ∧ (∀ (i : ι), y i ≠ 0 → i ∈ s) ∧ n • y = f) ↔
s.sum f = n * m ∧ (∀ (i : ι), f i ≠ 0 → i ∈ s) ∧ ∀ i ∈ s, n ∣ f i
|
ι : Type u_1
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq (ι → ℕ)
s : Finset ι
m n : ℕ
hn : n ≠ 0
f : ι → ℕ
⊢ (∃ y ∈ s.piAntidiag m, n • y = f) ↔ f ∈ {f ∈ s.piAntidiag (n * m) | ∀ i ∈ s, n ∣ f i}
|
constructor
|
h
|
(∃ y, s.sum y = m ∧ (∀ (i : ι), y i ≠ 0 → i ∈ s) ∧ n • y = f) →
s.sum f = n * m ∧ (∀ (i : ι), f i ≠ 0 → i ∈ s) ∧ ∀ i ∈ s, n ∣ f i
|
ι : Type u_1
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq (ι → ℕ)
s : Finset ι
m n : ℕ
hn : n ≠ 0
f : ι → ℕ
⊢ (∃ y, s.sum y = m ∧ (∀ (i : ι), y i ≠ 0 → i ∈ s) ∧ n • y = f) ↔
s.sum f = n * m ∧ (∀ (i : ι), f i ≠ 0 → i ∈ s) ∧ ∀ i ∈ s, n ∣ f i
|
constructor
|
h
|
(s.sum f = n * m ∧ (∀ (i : ι), f i ≠ 0 → i ∈ s) ∧ ∀ i ∈ s, n ∣ f i) →
∃ y, s.sum y = m ∧ (∀ (i : ι), y i ≠ 0 → i ∈ s) ∧ n • y = f
|
ι : Type u_1
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq (ι → ℕ)
s : Finset ι
m n : ℕ
hn : n ≠ 0
f : ι → ℕ
h : (∃ y, s.sum y = m ∧ (∀ (i : ι), y i ≠ 0 → i ∈ s) ∧ n • y = f) →
s.sum f = n * m ∧ (∀ (i : ι), f i ≠ 0 → i ∈ s) ∧ ∀ i ∈ s, n ∣ f i
⊢ (∃ y, s.sum y = m ∧ (∀ (i : ι), y i ≠ 0 → i ∈ s) ∧ n • y = f) ↔
s.sum f = n * m ∧ (∀ (i : ι), f i ≠ 0 → i ∈ s) ∧ ∀ i ∈ s, n ∣ f i
|
have (i) : n ∣ f i := by
by_cases hi : i ∈ s
· exact hfdvd _ hi
· rw [not_imp_comm.1 (hfsup _) hi]
exact dvd_zero _
|
h
|
∃ y, s.sum y = m ∧ (∀ (i : ι), y i ≠ 0 → i ∈ s) ∧ n • y = f
|
ι : Type u_1
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq (ι → ℕ)
s : Finset ι
m n : ℕ
hn : n ≠ 0
f : ι → ℕ
hfsum : s.sum f = n * m
hfsup : ∀ (i : ι), f i ≠ 0 → i ∈ s
hfdvd : ∀ i ∈ s, n ∣ f i
⊢ ∃ y, s.sum y = m ∧ (∀ (i : ι), y i ≠ 0 → i ∈ s) ∧ n • y = f
|
by_cases hi : i ∈ s
|
pos
|
n ∣ f i
|
ι : Type u_1
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq (ι → ℕ)
s : Finset ι
m n : ℕ
hn : n ≠ 0
f : ι → ℕ
hfsum : s.sum f = n * m
hfsup : ∀ (i : ι), f i ≠ 0 → i ∈ s
hfdvd : ∀ i ∈ s, n ∣ f i
i : ι
⊢ n ∣ f i
|
by_cases hi : i ∈ s
|
neg
|
n ∣ f i
|
ι : Type u_1
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq (ι → ℕ)
s : Finset ι
m n : ℕ
hn : n ≠ 0
f : ι → ℕ
hfsum : s.sum f = n * m
hfsup : ∀ (i : ι), f i ≠ 0 → i ∈ s
hfdvd : ∀ i ∈ s, n ∣ f i
i : ι
pos : n ∣ f i
⊢ n ∣ f i
|
rw [not_imp_comm.1 (hfsup _) hi]
|
neg
|
n ∣ 0
|
ι : Type u_1
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq (ι → ℕ)
s : Finset ι
m n : ℕ
hn : n ≠ 0
f : ι → ℕ
hfsum : s.sum f = n * m
hfsup : ∀ (i : ι), f i ≠ 0 → i ∈ s
hfdvd : ∀ i ∈ s, n ∣ f i
i : ι
hi : i ∉ s
⊢ n ∣ f i
|
not_imp_comm.1 (hfsup _) hi
|
neg
|
n ∣ 0
|
ι : Type u_1
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq (ι → ℕ)
s : Finset ι
m n : ℕ
hn : n ≠ 0
f : ι → ℕ
hfsum : s.sum f = n * m
hfsup : ∀ (i : ι), f i ≠ 0 → i ∈ s
hfdvd : ∀ i ∈ s, n ∣ f i
i : ι
hi : i ∉ s
⊢ n ∣ f i
|
refine ⟨fun i ↦ f i / n, ?_⟩
|
h
|
∑ i ∈ s, f i / n = m ∧ (∀ (i : ι), (fun i ↦ f i / n) i ≠ 0 → i ∈ s) ∧ (n • fun i ↦ f i / n) = f
|
ι : Type u_1
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq (ι → ℕ)
s : Finset ι
m n : ℕ
hn : n ≠ 0
f : ι → ℕ
hfsum : s.sum f = n * m
hfsup : ∀ (i : ι), f i ≠ 0 → i ∈ s
hfdvd : ∀ i ∈ s, n ∣ f i
this : ∀ (i : ι), n ∣ f i
⊢ ∃ y, s.sum y = m ∧ (∀ (i : ι), y i ≠ 0 → i ∈ s) ∧ n • y = f
|
simp [funext_iff, Nat.mul_div_cancel', ← Nat.sum_div, *]
|
h
|
∀ (i : ι), n ≤ f i → i ∈ s
|
ι : Type u_1
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq (ι → ℕ)
s : Finset ι
m n : ℕ
hn : n ≠ 0
f : ι → ℕ
hfsum : s.sum f = n * m
hfsup : ∀ (i : ι), f i ≠ 0 → i ∈ s
hfdvd : ∀ i ∈ s, n ∣ f i
this : ∀ (i : ι), n ∣ f i
⊢ ∑ i ∈ s, f i / n = m ∧ (∀ (i : ι), (fun i ↦ f i / n) i ≠ 0 → i ∈ s) ∧ (n • fun i ↦ f i / n) = f
|
rw [map_eq_image]
|
rw
|
image (⇑{ toFun := fun x ↦ n • x, inj' := sorry } : (ι → ℕ) → ι → ℕ) (s.piAntidiag m) =
{f ∈ s.piAntidiag (n * m) | ∀ i ∈ s, n ∣ f i}
|
ι : Type u_1
inst✝ : DecidableEq ι
s : Finset ι
m n : ℕ
hn : n ≠ 0
⊢ map { toFun := fun x ↦ n • x, inj' := ⋯ } (s.piAntidiag m) = {f ∈ s.piAntidiag (n * m) | ∀ i ∈ s, n ∣ f i}
|
map_eq_image
|
map_eq_image
|
image (⇑{ toFun := fun x ↦ n • x, inj' := sorry } : (ι → ℕ) → ι → ℕ) (s.piAntidiag m) =
{f ∈ s.piAntidiag (n * m) | ∀ i ∈ s, n ∣ f i}
|
ι : Type u_1
inst✝ : DecidableEq ι
s : Finset ι
m n : ℕ
hn : n ≠ 0
⊢ map { toFun := fun x ↦ n • x, inj' := ⋯ } (s.piAntidiag m) = {f ∈ s.piAntidiag (n * m) | ∀ i ∈ s, n ∣ f i}
|
ext f
|
h
|
f ∈ map { toFun := fun m a ↦ Multiset.count a (↑m : Multiset ι), inj' := sorry } (s.sym n) ↔ f ∈ s.piAntidiag n
|
ι : Type u_1
inst✝ : DecidableEq ι
s : Finset ι
n : ℕ
⊢ map { toFun := fun m a ↦ Multiset.count a (↑m : Multiset ι), inj' := ⋯ } (s.sym n) = s.piAntidiag n
|
simp only [Sym.val_eq_coe, mem_map, mem_sym_iff, Embedding.coeFn_mk, funext_iff, Sym.exists,
Sym.mem_mk, Sym.coe_mk, exists_and_left, exists_prop, mem_piAntidiag, ne_eq]
|
h
|
(∃ s_1, (∀ a ∈ s_1, a ∈ s) ∧ s_1.card = n ∧ ∀ (x : ι), Multiset.count x s_1 = f x) ↔
s.sum f = n ∧ ∀ (i : ι), ¬f i = 0 → i ∈ s
|
ι : Type u_1
inst✝ : DecidableEq ι
s : Finset ι
n : ℕ
f : ι → ℕ
⊢ f ∈ map { toFun := fun m a ↦ Multiset.count a (↑m : Multiset ι), inj' := ⋯ } (s.sym n) ↔ f ∈ s.piAntidiag n
|
constructor
|
h
|
(∃ s_1, (∀ a ∈ s_1, a ∈ s) ∧ s_1.card = n ∧ ∀ (x : ι), Multiset.count x s_1 = f x) →
s.sum f = n ∧ ∀ (i : ι), ¬f i = 0 → i ∈ s
|
ι : Type u_1
inst✝ : DecidableEq ι
s : Finset ι
n : ℕ
f : ι → ℕ
⊢ (∃ s_1, (∀ a ∈ s_1, a ∈ s) ∧ s_1.card = n ∧ ∀ (x : ι), Multiset.count x s_1 = f x) ↔
s.sum f = n ∧ ∀ (i : ι), ¬f i = 0 → i ∈ s
|
constructor
|
h
|
(s.sum f = n ∧ ∀ (i : ι), ¬f i = 0 → i ∈ s) →
∃ s_1, (∀ a ∈ s_1, a ∈ s) ∧ s_1.card = n ∧ ∀ (x : ι), Multiset.count x s_1 = f x
|
ι : Type u_1
inst✝ : DecidableEq ι
s : Finset ι
n : ℕ
f : ι → ℕ
h : (∃ s_1, (∀ a ∈ s_1, a ∈ s) ∧ s_1.card = n ∧ ∀ (x : ι), Multiset.count x s_1 = f x) →
s.sum f = n ∧ ∀ (i : ι), ¬f i = 0 → i ∈ s
⊢ (∃ s_1, (∀ a ∈ s_1, a ∈ s) ∧ s_1.card = n ∧ ∀ (x : ι), Multiset.count x s_1 = f x) ↔
s.sum f = n ∧ ∀ (i : ι), ¬f i = 0 → i ∈ s
|
refine ⟨∑ a ∈ s, f a • {a}, ?_, ?_⟩
|
h
|
∀ a ∈ ∑ a ∈ s, f a • {a}, a ∈ s
|
ι : Type u_1
inst✝ : DecidableEq ι
s : Finset ι
f : ι → ℕ
hf : ∀ (i : ι), ¬f i = 0 → i ∈ s
⊢ ∃ s_1, (∀ a ∈ s_1, a ∈ s) ∧ s_1.card = s.sum f ∧ ∀ (x : ι), Multiset.count x s_1 = f x
|
refine ⟨∑ a ∈ s, f a • {a}, ?_, ?_⟩
|
h
|
(∑ a ∈ s, f a • {a}).card = s.sum f ∧ ∀ (x : ι), Multiset.count x (∑ a ∈ s, f a • {a}) = f x
|
ι : Type u_1
inst✝ : DecidableEq ι
s : Finset ι
f : ι → ℕ
hf : ∀ (i : ι), ¬f i = 0 → i ∈ s
h : ∀ a ∈ ∑ a ∈ s, f a • {a}, a ∈ s
⊢ ∃ s_1, (∀ a ∈ s_1, a ∈ s) ∧ s_1.card = s.sum f ∧ ∀ (x : ι), Multiset.count x s_1 = f x
|
by_cases hp : p = 0
|
pos
|
p.mirror.natDegree = p.natDegree
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
⊢ p.mirror.natDegree = p.natDegree
|
by_cases hp : p = 0
|
neg
|
p.mirror.natDegree = p.natDegree
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
pos : p.mirror.natDegree = p.natDegree
⊢ p.mirror.natDegree = p.natDegree
|
hp,
|
pos
|
(mirror 0).natDegree = natDegree 0
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
hp : p = 0
⊢ p.mirror.natDegree = p.natDegree
|
mirror_zero
|
pos
|
natDegree 0 = natDegree 0
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
hp : p = 0
⊢ (mirror 0).natDegree = natDegree 0
|
rw [mirror, natDegree_mul', reverse_natDegree, natDegree_X_pow,
tsub_add_cancel_of_le p.natTrailingDegree_le_natDegree]
|
rw
|
p.reverse.leadingCoeff * (X ^ p.natTrailingDegree).leadingCoeff ≠ 0
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
hp : ¬p = 0
a✝ : Nontrivial R
⊢ p.mirror.natDegree = p.natDegree
|
mirror,
|
this
|
(p.reverse * X ^ p.natTrailingDegree).natDegree = p.natDegree
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
hp : ¬p = 0
a✝ : Nontrivial R
⊢ p.mirror.natDegree = p.natDegree
|
natDegree_mul',
|
this
|
p.reverse.natDegree + (X ^ p.natTrailingDegree).natDegree = p.natDegree
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
hp : ¬p = 0
a✝ : Nontrivial R
⊢ (p.reverse * X ^ p.natTrailingDegree).natDegree = p.natDegree
|
natDegree_mul',
|
this
|
p.reverse.leadingCoeff * (X ^ p.natTrailingDegree).leadingCoeff ≠ 0
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
hp : ¬p = 0
a✝ : Nontrivial R
this : p.reverse.natDegree + (X ^ p.natTrailingDegree).natDegree = p.natDegree
⊢ (p.reverse * X ^ p.natTrailingDegree).natDegree = p.natDegree
|
leadingCoeff_X_pow,
|
this
|
p.reverse.leadingCoeff * 1 ≠ 0
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
hp : ¬p = 0
a✝ : Nontrivial R
⊢ p.reverse.leadingCoeff * (X ^ p.natTrailingDegree).leadingCoeff ≠ 0
|
mul_one,
|
this
|
p.reverse.leadingCoeff ≠ 0
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
hp : ¬p = 0
a✝ : Nontrivial R
⊢ p.reverse.leadingCoeff * 1 ≠ 0
|
reverse_leadingCoeff,
|
this
|
p.trailingCoeff ≠ 0
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
hp : ¬p = 0
a✝ : Nontrivial R
⊢ p.reverse.leadingCoeff ≠ 0
|
Ne,
|
this
|
¬p.trailingCoeff = 0
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
hp : ¬p = 0
a✝ : Nontrivial R
⊢ p.trailingCoeff ≠ 0
|
trailingCoeff_eq_zero
|
trailingCoeff_eq_zero
|
¬p = 0
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
hp : ¬p = 0
a✝ : Nontrivial R
⊢ ¬p.trailingCoeff = 0
|
by_cases hp : p = 0
|
pos
|
p.mirror.natTrailingDegree = p.natTrailingDegree
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
⊢ p.mirror.natTrailingDegree = p.natTrailingDegree
|
by_cases hp : p = 0
|
neg
|
p.mirror.natTrailingDegree = p.natTrailingDegree
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
pos : p.mirror.natTrailingDegree = p.natTrailingDegree
⊢ p.mirror.natTrailingDegree = p.natTrailingDegree
|
hp,
|
pos
|
(mirror 0).natTrailingDegree = natTrailingDegree 0
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
hp : p = 0
⊢ p.mirror.natTrailingDegree = p.natTrailingDegree
|
mirror_zero
|
pos
|
natTrailingDegree 0 = natTrailingDegree 0
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
hp : p = 0
⊢ (mirror 0).natTrailingDegree = natTrailingDegree 0
|
mirror,
|
neg
|
(p.reverse * X ^ p.natTrailingDegree).natTrailingDegree = p.natTrailingDegree
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
hp : ¬p = 0
⊢ p.mirror.natTrailingDegree = p.natTrailingDegree
|
natTrailingDegree_mul_X_pow ((mt reverse_eq_zero.mp) hp),
|
neg
|
p.reverse.natTrailingDegree + p.natTrailingDegree = p.natTrailingDegree
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
hp : ¬p = 0
⊢ (p.reverse * X ^ p.natTrailingDegree).natTrailingDegree = p.natTrailingDegree
|
natTrailingDegree_reverse,
|
neg
|
0 + p.natTrailingDegree = p.natTrailingDegree
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
hp : ¬p = 0
⊢ p.reverse.natTrailingDegree + p.natTrailingDegree = p.natTrailingDegree
|
zero_add
|
neg
|
p.natTrailingDegree = p.natTrailingDegree
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
hp : ¬p = 0
⊢ 0 + p.natTrailingDegree = p.natTrailingDegree
|
by_cases h2 : p.natDegree < n
|
pos
|
p.mirror.coeff n = p.coeff ((revAt (p.natDegree + p.natTrailingDegree) : ℕ → ℕ) n)
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
n : ℕ
⊢ p.mirror.coeff n = p.coeff ((revAt (p.natDegree + p.natTrailingDegree) : ℕ → ℕ) n)
|
by_cases h2 : p.natDegree < n
|
neg
|
p.mirror.coeff n = p.coeff ((revAt (p.natDegree + p.natTrailingDegree) : ℕ → ℕ) n)
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
n : ℕ
pos : p.mirror.coeff n = p.coeff ((revAt (p.natDegree + p.natTrailingDegree) : ℕ → ℕ) n)
⊢ p.mirror.coeff n = p.coeff ((revAt (p.natDegree + p.natTrailingDegree) : ℕ → ℕ) n)
|
rw [coeff_eq_zero_of_natDegree_lt (by rwa [mirror_natDegree])]
|
pos
|
0 = p.coeff ((revAt (p.natDegree + p.natTrailingDegree) : ℕ → ℕ) n)
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
n : ℕ
h2 : p.natDegree < n
⊢ p.mirror.coeff n = p.coeff ((revAt (p.natDegree + p.natTrailingDegree) : ℕ → ℕ) n)
|
coeff_eq_zero_of_natDegree_lt (by rwa [mirror_natDegree])
|
pos
|
0 = p.coeff ((revAt (p.natDegree + p.natTrailingDegree) : ℕ → ℕ) n)
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
n : ℕ
h2 : p.natDegree < n
⊢ p.mirror.coeff n = p.coeff ((revAt (p.natDegree + p.natTrailingDegree) : ℕ → ℕ) n)
|
mirror_natDegree
|
mirror_natDegree
|
p.natDegree < n
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
n : ℕ
h2 : p.natDegree < n
⊢ p.mirror.natDegree < n
|
by_cases h1 : n ≤ p.natDegree + p.natTrailingDegree
|
pos
|
0 = p.coeff ((revAt (p.natDegree + p.natTrailingDegree) : ℕ → ℕ) n)
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
n : ℕ
h2 : p.natDegree < n
⊢ 0 = p.coeff ((revAt (p.natDegree + p.natTrailingDegree) : ℕ → ℕ) n)
|
by_cases h1 : n ≤ p.natDegree + p.natTrailingDegree
|
neg
|
0 = p.coeff ((revAt (p.natDegree + p.natTrailingDegree) : ℕ → ℕ) n)
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
n : ℕ
h2 : p.natDegree < n
pos : 0 = p.coeff ((revAt (p.natDegree + p.natTrailingDegree) : ℕ → ℕ) n)
⊢ 0 = p.coeff ((revAt (p.natDegree + p.natTrailingDegree) : ℕ → ℕ) n)
|
rw [revAt_le h1, coeff_eq_zero_of_lt_natTrailingDegree]
|
pos
|
p.natDegree + p.natTrailingDegree - n < p.natTrailingDegree
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
n : ℕ
h2 : p.natDegree < n
h1 : n ≤ p.natDegree + p.natTrailingDegree
⊢ 0 = p.coeff ((revAt (p.natDegree + p.natTrailingDegree) : ℕ → ℕ) n)
|
revAt_le h1,
|
pos
|
0 = p.coeff (p.natDegree + p.natTrailingDegree - n)
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
n : ℕ
h2 : p.natDegree < n
h1 : n ≤ p.natDegree + p.natTrailingDegree
⊢ 0 = p.coeff ((revAt (p.natDegree + p.natTrailingDegree) : ℕ → ℕ) n)
|
coeff_eq_zero_of_lt_natTrailingDegree
|
pos
|
0 = 0
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
n : ℕ
h2 : p.natDegree < n
h1 : n ≤ p.natDegree + p.natTrailingDegree
⊢ 0 = p.coeff (p.natDegree + p.natTrailingDegree - n)
|
coeff_eq_zero_of_lt_natTrailingDegree
|
pos
|
p.natDegree + p.natTrailingDegree - n < p.natTrailingDegree
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
n : ℕ
h2 : p.natDegree < n
h1 : n ≤ p.natDegree + p.natTrailingDegree
pos : 0 = 0
⊢ 0 = p.coeff (p.natDegree + p.natTrailingDegree - n)
|
← revAtFun_eq,
|
neg
|
0 = p.coeff (revAtFun (p.natDegree + p.natTrailingDegree) n)
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
n : ℕ
h2 : p.natDegree < n
h1 : ¬n ≤ p.natDegree + p.natTrailingDegree
⊢ 0 = p.coeff ((revAt (p.natDegree + p.natTrailingDegree) : ℕ → ℕ) n)
|
revAtFun,
|
neg
|
0 = p.coeff (if n ≤ p.natDegree + p.natTrailingDegree then p.natDegree + p.natTrailingDegree - n else n)
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
n : ℕ
h2 : p.natDegree < n
h1 : ¬n ≤ p.natDegree + p.natTrailingDegree
⊢ 0 = p.coeff (revAtFun (p.natDegree + p.natTrailingDegree) n)
|
if_neg h1,
|
neg
|
0 = p.coeff n
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
n : ℕ
h2 : p.natDegree < n
h1 : ¬n ≤ p.natDegree + p.natTrailingDegree
⊢ 0 = p.coeff (if n ≤ p.natDegree + p.natTrailingDegree then p.natDegree + p.natTrailingDegree - n else n)
|
coeff_eq_zero_of_natDegree_lt h2
|
neg
|
0 = 0
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
n : ℕ
h2 : p.natDegree < n
h1 : ¬n ≤ p.natDegree + p.natTrailingDegree
⊢ 0 = p.coeff n
|
rw [revAt_le (h2.trans (Nat.le_add_right _ _))]
|
neg
|
p.mirror.coeff n = p.coeff (p.natDegree + p.natTrailingDegree - n)
|
R : Type u_1
inst✝ : Semiring R
p : R[X]
n : ℕ
h2 : n ≤ p.natDegree
⊢ p.mirror.coeff n = p.coeff ((revAt (p.natDegree + p.natTrailingDegree) : ℕ → ℕ) n)
|
End of preview. Expand
in Data Studio
- Downloads last month
- 16