tactic
stringlengths
1
5.59k
name
stringlengths
1
85
haveDraft
stringlengths
1
44.5k
goal
stringlengths
8
62.2k
| smul r x _ hpx =>
a
x ∈ s → x ∈ span R (↑(Subsemigroup.closure s) : Set A)
R : Type u A : Type v inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A s : Set A x✝ : A r : R x : A hx✝ : x ∈ adjoin R s hpx : x ∈ span R (↑(Subsemigroup.closure s) : Set A) ⊢ r • x ∈ span R (↑(Subsemigroup.closure s) : Set A)
| smul r x _ hpx =>
a
x ∈ adjoin R s → y ∈ adjoin R s → x ∈ span R (↑(Subsemigroup.closure s) : Set A) → y ∈ span R (↑(Subsemigroup.closure s) : Set A) → x + y ∈ span R (↑(Subsemigroup.closure s) : Set A)
R : Type u A : Type v inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A s : Set A x✝ : A r : R x : A hx✝ : x ∈ adjoin R s hpx : x ∈ span R (↑(Subsemigroup.closure s) : Set A) a : _fvar.190166 ∈ s → _fvar.190166 ∈ span R (↑(Subsemigroup.closure s) : Set A) ⊢ r • x ∈ span R (↑(Subsemigroup.closure s) : Set A)
| smul r x _ hpx =>
a
0 ∈ span R (↑(Subsemigroup.closure s) : Set A)
R : Type u A : Type v inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A s : Set A x✝ : A r : R x : A hx✝ : x ∈ adjoin R s hpx : x ∈ span R (↑(Subsemigroup.closure s) : Set A) a : _fvar.190166 ∈ s → _fvar.190166 ∈ span R (↑(Subsemigroup.closure s) : Set A) a₁ : _fvar.190498 ∈ adjoin R s → _fvar.190499 ∈ adjoin R s → _fvar.190498 ∈ span R (↑(Subsemigroup.closure s) : Set A) → _fvar.190499 ∈ span R (↑(Subsemigroup.closure s) : Set A) → _fvar.190498 + _fvar.190499 ∈ span R (↑(Subsemigroup.closure s) : Set A) ⊢ r • x ∈ span R (↑(Subsemigroup.closure s) : Set A)
| smul r x _ hpx =>
a
x ∈ adjoin R s → y ∈ adjoin R s → x ∈ span R (↑(Subsemigroup.closure s) : Set A) → y ∈ span R (↑(Subsemigroup.closure s) : Set A) → x * y ∈ span R (↑(Subsemigroup.closure s) : Set A)
R : Type u A : Type v inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A s : Set A x✝ : A r : R x : A hx✝ : x ∈ adjoin R s hpx : x ∈ span R (↑(Subsemigroup.closure s) : Set A) a : _fvar.190166 ∈ s → _fvar.190166 ∈ span R (↑(Subsemigroup.closure s) : Set A) a₁ : _fvar.190498 ∈ adjoin R s → _fvar.190499 ∈ adjoin R s → _fvar.190498 ∈ span R (↑(Subsemigroup.closure s) : Set A) → _fvar.190499 ∈ span R (↑(Subsemigroup.closure s) : Set A) → _fvar.190498 + _fvar.190499 ∈ span R (↑(Subsemigroup.closure s) : Set A) a₂ : 0 ∈ span R (↑(Subsemigroup.closure s) : Set A) ⊢ r • x ∈ span R (↑(Subsemigroup.closure s) : Set A)
apply span_le.2 _
apply
(↑(Subsemigroup.closure s) : Set A) ⊆ (↑(adjoin R s).toSubmodule : Set A)
R : Type u A : Type v inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A s : Set A ⊢ span R (↑(Subsemigroup.closure s) : Set A) ≤ (adjoin R s).toSubmodule
apply GaloisConnection.l_bot
gc
GaloisConnection (adjoin R) SetLike.coe
R : Type u A : Type v inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A ⊢ adjoin R ⊥ = ⊥
apply GaloisConnection.l_bot
u
NonUnitalSubalgebra R A → Set A
R : Type u A : Type v inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A gc : GaloisConnection (adjoin R) SetLike.coe ⊢ adjoin R ⊥ = ⊥
apply SetLike.coe_injective
a
(↑(NonUnitalSubalgebra.map f (⨅ i, S i)) : Set B) = (↑(⨅ i, NonUnitalSubalgebra.map f (S i)) : Set B)
F : Type u_1 R : Type u A : Type v B : Type w inst✝¹¹ : CommSemiring R inst✝¹⁰ : NonUnitalNonAssocSemiring A inst✝⁹ : Module R A inst✝⁸ : NonUnitalNonAssocSemiring B inst✝⁷ : Module R B inst✝⁶ : FunLike F A B inst✝⁵ : NonUnitalAlgHomClass F R A B inst✝⁴ : IsScalarTower R A A inst✝³ : SMulCommClass R A A ι : Sort u_2 inst✝² : Nonempty ι inst✝¹ : IsScalarTower R B B inst✝ : SMulCommClass R B B f : F hf : Function.Injective (⇑f : A → B) S : ι → NonUnitalSubalgebra R A ⊢ NonUnitalSubalgebra.map f (⨅ i, S i) = ⨅ i, NonUnitalSubalgebra.map f (S i)
NonUnitalSubsemiring.closure_empty,
this
x ∈ Submodule.span R (↑⊥ : Set A) ↔ x = 0
R : Type u A : Type v inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A x : A ⊢ x ∈ Submodule.span R (↑(NonUnitalSubsemiring.closure ∅) : Set A) ↔ x = 0
NonUnitalSubsemiring.coe_bot,
this
x ∈ Submodule.span R {0} ↔ x = 0
R : Type u A : Type v inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A x : A ⊢ x ∈ Submodule.span R (↑⊥ : Set A) ↔ x = 0
Submodule.span_zero_singleton,
this
x ∈ ⊥ ↔ x = 0
R : Type u A : Type v inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A x : A ⊢ x ∈ Submodule.span R {0} ↔ x = 0
ext
h
x✝ ∈ ⊥.toSubmodule ↔ x✝ ∈ ⊥
R : Type u A : Type v inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A ⊢ ⊥.toSubmodule = ⊥
rw [h]
rw
x ∈ ⊤
R : Type u A : Type v inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A S : NonUnitalSubalgebra R A h : S = ⊤ x : A ⊢ x ∈ S
h
h
x ∈ ⊤
R : Type u A : Type v inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A S : NonUnitalSubalgebra R A h : S = ⊤ x : A ⊢ x ∈ S
ext x
h
x ∈ S ↔ x ∈ ⊤
R : Type u A : Type v inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A S : NonUnitalSubalgebra R A h : ∀ (x : A), x ∈ S ⊢ S = ⊤
ext
h
x✝ ∈ ⊤.prod ⊤ ↔ x✝ ∈ ⊤
R : Type u A : Type v B : Type w inst✝⁸ : CommSemiring R inst✝⁷ : NonUnitalNonAssocSemiring A inst✝⁶ : Module R A inst✝⁵ : NonUnitalNonAssocSemiring B inst✝⁴ : Module R B inst✝³ : IsScalarTower R A A inst✝² : SMulCommClass R A A inst✝¹ : IsScalarTower R B B inst✝ : SMulCommClass R B B ⊢ ⊤.prod ⊤ = ⊤
subst hT
subst
↥(iSup K) →ₙₐ[R] B
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A S : NonUnitalSubalgebra R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) T : NonUnitalSubalgebra R A hT : T = iSup K ⊢ ↥T →ₙₐ[R] B
simp only
simp
(f i : ↥(K i) → B) ⟨x, sorry⟩ = (f j : ↥(K j) → B) ⟨x, sorry⟩
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A S : NonUnitalSubalgebra R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) i j : ι x : A hxi : x ∈ (fun i ↦ (↑(K i) : Set A)) i hxj : x ∈ (fun i ↦ (↑(K i) : Set A)) j k : ι hik : (fun x1 x2 ↦ x1 ≤ x2) (K i) (K k) hjk : (fun x1 x2 ↦ x1 ≤ x2) (K j) (K k) ⊢ (fun i x ↦ (f i : ↥(K i) → B) x) i ⟨x, hxi⟩ = (fun i x ↦ (f i : ↥(K i) → B) x) j ⟨x, hxj⟩
rw [hf i k hik, hf j k hjk]
rw
((f k).comp (inclusion sorry) : ↥(K i) → B) ⟨x, sorry⟩ = ((f k).comp (inclusion sorry) : ↥(K j) → B) ⟨x, sorry⟩
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A S : NonUnitalSubalgebra R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) i j : ι x : A hxi : x ∈ (fun i ↦ (↑(K i) : Set A)) i hxj : x ∈ (fun i ↦ (↑(K i) : Set A)) j k : ι hik : (fun x1 x2 ↦ x1 ≤ x2) (K i) (K k) hjk : (fun x1 x2 ↦ x1 ≤ x2) (K j) (K k) ⊢ (f i : ↥(K i) → B) ⟨x, hxi⟩ = (f j : ↥(K j) → B) ⟨x, hxj⟩
hf i k hik,
hf
((f k).comp (inclusion sorry) : ↥(K i) → B) ⟨x, sorry⟩ = (f j : ↥(K j) → B) ⟨x, sorry⟩
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A S : NonUnitalSubalgebra R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) i j : ι x : A hxi : x ∈ (fun i ↦ (↑(K i) : Set A)) i hxj : x ∈ (fun i ↦ (↑(K i) : Set A)) j k : ι hik : (fun x1 x2 ↦ x1 ≤ x2) (K i) (K k) hjk : (fun x1 x2 ↦ x1 ≤ x2) (K j) (K k) ⊢ (f i : ↥(K i) → B) ⟨x, hxi⟩ = (f j : ↥(K j) → B) ⟨x, hxj⟩
hf j k hjk
hf
((f k).comp (inclusion sorry) : ↥(K i) → B) ⟨x, sorry⟩ = ((f k).comp (inclusion sorry) : ↥(K j) → B) ⟨x, sorry⟩
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A S : NonUnitalSubalgebra R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) i j : ι x : A hxi : x ∈ (fun i ↦ (↑(K i) : Set A)) i hxj : x ∈ (fun i ↦ (↑(K i) : Set A)) j k : ι hik : (fun x1 x2 ↦ x1 ≤ x2) (K i) (K k) hjk : (fun x1 x2 ↦ x1 ≤ x2) (K j) (K k) ⊢ ((f k).comp (inclusion hik) : ↥(K i) → B) ⟨x, hxi⟩ = (f j : ↥(K j) → B) ⟨x, hxj⟩
coe_iSup_of_directed dir
coe_iSup_of_directed
⋃ i, (↑(K i) : Set A) ⊆ ⋃ i, (↑(K i) : Set A)
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A S : NonUnitalSubalgebra R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) ⊢ (↑(iSup K) : Set A) ⊆ ⋃ i, (↑(K i) : Set A)
dsimp
dsimp
∀ (x : ↥(iSup K)), Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) sorry (↑(iSup K) : Set A) sorry (r • x) = r • Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) sorry (↑(iSup K) : Set A) sorry x
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A S : NonUnitalSubalgebra R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) r : R ⊢ ∀ (x : ↥(iSup K)), Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) ⋯ (↑(iSup K) : Set A) ⋯ (r • x) = (MonoidHom.id R : R → R) r • Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) ⋯ (↑(iSup K) : Set A) ⋯ x
apply Set.iUnionLift_unary (coe_iSup_of_directed dir) _ (fun _ x => r • x) (fun _ _ => rfl)
h
∀ (i : ι) (x : (↑(↑(K i) : Set A) : Type v)), (f i : ↥(K i) → B) (r • x) = r • (f i : ↥(K i) → B) x
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A S : NonUnitalSubalgebra R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) r : R ⊢ ∀ (x : ↥(iSup K)), Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) ⋯ (↑(iSup K) : Set A) ⋯ (r • x) = r • Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) ⋯ (↑(iSup K) : Set A) ⋯ x
apply Set.iUnionLift_binary (coe_iSup_of_directed dir) dir _ (fun _ => (· + ·))
hopi
∀ (i : ι) (x y : (↑(↑(K i) : Set A) : Type v)), Set.inclusion sorry (x + y) = Set.inclusion sorry x + Set.inclusion sorry y
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A S : NonUnitalSubalgebra R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) ⊢ ∀ (x y : ↥(iSup K)), Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) ⋯ (↑(iSup K) : Set A) ⋯ (x + y) = Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) ⋯ (↑(iSup K) : Set A) ⋯ x + Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) ⋯ (↑(iSup K) : Set A) ⋯ y
apply Set.iUnionLift_binary (coe_iSup_of_directed dir) dir _ (fun _ => (· + ·))
h
∀ (i : ι) (x y : (↑(↑(K i) : Set A) : Type v)), (f i : ↥(K i) → B) (x + y) = (f i : ↥(K i) → B) x + (f i : ↥(K i) → B) y
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A S : NonUnitalSubalgebra R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) hopi : ∀ (i : ι) (x y : (↑(↑(K i) : Set A) : Type v)), Set.inclusion ⋯ (x + y) = Set.inclusion ⋯ x + Set.inclusion ⋯ y ⊢ ∀ (x y : ↥(iSup K)), Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) ⋯ (↑(iSup K) : Set A) ⋯ (x + y) = Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) ⋯ (↑(iSup K) : Set A) ⋯ x + Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) ⋯ (↑(iSup K) : Set A) ⋯ y
apply Set.iUnionLift_binary (coe_iSup_of_directed dir) dir _ (fun _ => (· * ·))
hopi
∀ (i : ι) (x y : (↑(↑(K i) : Set A) : Type v)), Set.inclusion sorry (x * y) = Set.inclusion sorry x * Set.inclusion sorry y
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A S : NonUnitalSubalgebra R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) ⊢ ∀ (x y : ↥(iSup K)), Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) ⋯ (↑(iSup K) : Set A) ⋯ (x * y) = Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) ⋯ (↑(iSup K) : Set A) ⋯ x * Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) ⋯ (↑(iSup K) : Set A) ⋯ y
apply Set.iUnionLift_binary (coe_iSup_of_directed dir) dir _ (fun _ => (· * ·))
h
∀ (i : ι) (x y : (↑(↑(K i) : Set A) : Type v)), (f i : ↥(K i) → B) (x * y) = (f i : ↥(K i) → B) x * (f i : ↥(K i) → B) y
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A S : NonUnitalSubalgebra R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) hopi : ∀ (i : ι) (x y : (↑(↑(K i) : Set A) : Type v)), Set.inclusion ⋯ (x * y) = Set.inclusion ⋯ x * Set.inclusion ⋯ y ⊢ ∀ (x y : ↥(iSup K)), Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) ⋯ (↑(iSup K) : Set A) ⋯ (x * y) = Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) ⋯ (↑(iSup K) : Set A) ⋯ x * Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) ⋯ (↑(iSup K) : Set A) ⋯ y
subst T
subst
K i ≤ iSup K → (iSupLift K sorry f sorry (iSup K) sorry : ↥(iSup K) → B) ((inclusion sorry : ↥(K i) → ↥(iSup K)) x) = (f i : ↥(K i) → B) x
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) T : NonUnitalSubalgebra R A hT : T = iSup K i : ι x : ↥(K i) h : K i ≤ T ⊢ (iSupLift K dir f hf T hT : ↥T → B) ((inclusion h : ↥(K i) → ↥T) x) = (f i : ↥(K i) → B) x
dsimp [iSupLift]
dsimp
Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) sorry (↑(iSup K) : Set A) sorry ((inclusion sorry : ↥(K i) → ↥(iSup K)) x) = (f i : ↥(K i) → B) x
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) i : ι x : ↥(K i) h : K i ≤ iSup K ⊢ (iSupLift K dir f hf (iSup K) ⋯ : ↥(iSup K) → B) ((inclusion h : ↥(K i) → ↥(iSup K)) x) = (f i : ↥(K i) → B) x
apply Set.iUnionLift_inclusion
h
(↑(K i) : Set A) ⊆ (↑(iSup K) : Set A)
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) i : ι x : ↥(K i) h : K i ≤ iSup K ⊢ Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) ⋯ (↑(iSup K) : Set A) ⋯ ((inclusion h : ↥(K i) → ↥(iSup K)) x) = (f i : ↥(K i) → B) x
ext
h
((iSupLift K sorry f sorry T sorry).comp (inclusion sorry) : ↥(K i) → B) x✝ = (f i : ↥(K i) → B) x✝
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) T : NonUnitalSubalgebra R A hT : T = iSup K i : ι h : K i ≤ T ⊢ (iSupLift K dir f hf T hT).comp (inclusion h) = f i
subst hT
subst
(↑x : A) ∈ iSup K → (iSupLift K sorry f sorry (iSup K) sorry : ↥(iSup K) → B) ⟨(↑x : A), sorry⟩ = (f i : ↥(K i) → B) x
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) T : NonUnitalSubalgebra R A hT : T = iSup K i : ι x : ↥(K i) hx : (↑x : A) ∈ T ⊢ (iSupLift K dir f hf T hT : ↥T → B) ⟨(↑x : A), hx⟩ = (f i : ↥(K i) → B) x
dsimp [iSupLift]
dsimp
Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) sorry (↑(iSup K) : Set A) sorry ⟨(↑x : A), sorry⟩ = (f i : ↥(K i) → B) x
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) i : ι x : ↥(K i) hx : (↑x : A) ∈ iSup K ⊢ (iSupLift K dir f hf (iSup K) ⋯ : ↥(iSup K) → B) ⟨(↑x : A), hx⟩ = (f i : ↥(K i) → B) x
subst hT
subst
(↑x : A) ∈ K i → (iSupLift K sorry f sorry (iSup K) sorry : ↥(iSup K) → B) x = (f i : ↥(K i) → B) ⟨(↑x : A), sorry⟩
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) T : NonUnitalSubalgebra R A hT : T = iSup K i : ι x : ↥T hx : (↑x : A) ∈ K i ⊢ (iSupLift K dir f hf T hT : ↥T → B) x = (f i : ↥(K i) → B) ⟨(↑x : A), hx⟩
dsimp [iSupLift]
dsimp
Set.iUnionLift (fun i ↦ (↑(K i) : Set A)) (fun i x ↦ (f i : ↥(K i) → B) x) sorry (↑(iSup K) : Set A) sorry x = (f i : ↥(K i) → B) ⟨(↑x : A), sorry⟩
R : Type u A : Type v B : Type w inst✝⁷ : CommSemiring R inst✝⁶ : NonUnitalNonAssocSemiring A inst✝⁵ : Module R A inst✝⁴ : NonUnitalNonAssocSemiring B inst✝³ : Module R B inst✝² : IsScalarTower R A A inst✝¹ : SMulCommClass R A A ι : Type u_1 inst✝ : Nonempty ι K : ι → NonUnitalSubalgebra R A dir : Directed (fun x1 x2 ↦ x1 ≤ x2) K f : (i : ι) → ↥(K i) →ₙₐ[R] B hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h) i : ι x : ↥(iSup K) hx : (↑x : A) ∈ K i ⊢ (iSupLift K dir f hf (iSup K) ⋯ : ↥(iSup K) → B) x = (f i : ↥(K i) → B) ⟨(↑x : A), hx⟩
mul_smul_comm,
this
r • a * b = r • (b * a)
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A r : R a : A ha : a ∈ Set.center A b : A ⊢ r • a * b = b * r • a
smul_mul_assoc,
this
r • (a * b) = r • (b * a)
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A r : R a : A ha : a ∈ Set.center A b : A ⊢ r • a * b = r • (b * a)
ha.comm
this
r • (b * a) = r • (b * a)
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A r : R a : A ha : a ∈ Set.center A b : A ⊢ r • (a * b) = r • (b * a)
smul_mul_assoc,
this
r • (a * (b * c)) = r • a * b * c
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A r : R a : A ha : a ∈ Set.center A b c : A ⊢ r • a * (b * c) = r • a * b * c
smul_mul_assoc,
this
r • (a * (b * c)) = r • (a * b) * c
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A r : R a : A ha : a ∈ Set.center A b c : A ⊢ r • (a * (b * c)) = r • a * b * c
smul_mul_assoc,
this
r • (a * (b * c)) = r • (a * b * c)
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A r : R a : A ha : a ∈ Set.center A b c : A ⊢ r • (a * (b * c)) = r • (a * b) * c
ha.left_assoc
this
r • (a * b * c) = r • (a * b * c)
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A r : R a : A ha : a ∈ Set.center A b c : A ⊢ r • (a * (b * c)) = r • (a * b * c)
mul_smul_comm,
this
r • (b * a) * c = b * (r • a * c)
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A r : R a : A ha : a ∈ Set.center A b c : A ⊢ b * r • a * c = b * (r • a * c)
smul_mul_assoc,
this
r • (b * a * c) = b * (r • a * c)
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A r : R a : A ha : a ∈ Set.center A b c : A ⊢ r • (b * a) * c = b * (r • a * c)
smul_mul_assoc,
this
r • (b * a * c) = b * r • (a * c)
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A r : R a : A ha : a ∈ Set.center A b c : A ⊢ r • (b * a * c) = b * (r • a * c)
mul_smul_comm,
this
r • (b * a * c) = r • (b * (a * c))
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A r : R a : A ha : a ∈ Set.center A b c : A ⊢ r • (b * a * c) = b * r • (a * c)
ha.mid_assoc
this
r • (b * (a * c)) = r • (b * (a * c))
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A r : R a : A ha : a ∈ Set.center A b c : A ⊢ r • (b * a * c) = r • (b * (a * c))
mul_smul_comm,
this
r • (b * c * a) = b * (c * r • a)
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A r : R a : A ha : a ∈ Set.center A b c : A ⊢ b * c * r • a = b * (c * r • a)
mul_smul_comm,
this
r • (b * c * a) = b * r • (c * a)
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A r : R a : A ha : a ∈ Set.center A b c : A ⊢ r • (b * c * a) = b * (c * r • a)
mul_smul_comm,
this
r • (b * c * a) = r • (b * (c * a))
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A r : R a : A ha : a ∈ Set.center A b c : A ⊢ r • (b * c * a) = b * r • (c * a)
ha.right_assoc
this
r • (b * (c * a)) = r • (b * (c * a))
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalNonAssocSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A r : R a : A ha : a ∈ Set.center A b c : A ⊢ r • (b * c * a) = r • (b * (c * a))
mul_smul_comm,
this
r • (x * a) = r • a * x
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A s : Set A r : R a : A ha : a ∈ s.centralizer x : A hx : x ∈ s ⊢ x * r • a = r • a * x
smul_mul_assoc,
this
r • (x * a) = r • (a * x)
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A s : Set A r : R a : A ha : a ∈ s.centralizer x : A hx : x ∈ s ⊢ r • (x * a) = r • a * x
ha x hx
ha
r • (a * x) = r • (a * x)
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A s : Set A r : R a : A ha : a ∈ s.centralizer x : A hx : x ∈ s ⊢ r • (x * a) = r • (a * x)
have : a ∈ centralizer R s := by simpa only [Commute.symm_iff (a := a)] using h
have
a ∈ centralizer R s
R : Type u_1 A : Type u_2 inst✝⁴ : CommSemiring R inst✝³ : NonUnitalSemiring A inst✝² : Module R A inst✝¹ : IsScalarTower R A A inst✝ : SMulCommClass R A A a b : A s : Set A hb : b ∈ adjoin R s h : ∀ b ∈ s, Commute a b ⊢ Commute a b
set r := Ioc (c - #s) c
set
∑ x ∈ s, x ≤ ∑ x ∈ r, x
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c ⊢ ∑ x ∈ s, x ≤ ∑ x ∈ Ioc (c - (↑(#s) : ℤ)) c, x
rw [← sum_inter_add_sum_diff s r _]
rw
∑ x ∈ s ∩ r, x + ∑ x ∈ s \ r, x ≤ ∑ x ∈ s ∩ r, x + #(s \ r) • (c - (↑(#s) : ℤ))
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c ⊢ ∑ x ∈ s, x ≤ ∑ x ∈ s ∩ r, x + #(s \ r) • (c - (↑(#s) : ℤ))
← sum_inter_add_sum_diff s r _
sum_inter_add_sum_diff
∑ x ∈ s ∩ r, x + ∑ x ∈ s \ r, x ≤ ∑ x ∈ s ∩ r, x + #(s \ r) • (c - (↑(#s) : ℤ))
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c ⊢ ∑ x ∈ s, x ≤ ∑ x ∈ s ∩ r, x + #(s \ r) • (c - (↑(#s) : ℤ))
gcongr
bc
∑ x ∈ s \ r, x ≤ #(s \ r) • (c - (↑(#s) : ℤ))
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c ⊢ ∑ x ∈ s ∩ r, x + ∑ x ∈ s \ r, x ≤ ∑ x ∈ s ∩ r, x + #(s \ r) • (c - (↑(#s) : ℤ))
refine sum_le_card_nsmul _ _ _ fun x mx ↦ ?_
bc
x ∈ s \ r → x ≤ c - (↑(#s) : ℤ)
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c ⊢ ∑ x ∈ s \ r, x ≤ #(s \ r) • (c - (↑(#s) : ℤ))
rw [mem_sdiff, mem_Ioc, not_and'] at mx
bc
x ∈ s ∧ (x ≤ c → ¬c - (↑(#s) : ℤ) < x)
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c x : ℤ mx : x ∈ s \ r ⊢ x ≤ c - (↑(#s) : ℤ)
mem_sdiff,
bc
x ∈ s ∧ x ∉ r
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c x : ℤ mx : x ∈ s \ r ⊢ x ≤ c - (↑(#s) : ℤ)
mem_Ioc,
bc
x ∈ s ∧ ¬(c - (↑(#s) : ℤ) < x ∧ x ≤ c)
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c x : ℤ mx : x ∈ s ∧ x ∉ r ⊢ x ≤ c - (↑(#s) : ℤ)
not_and'
bc
x ∈ s ∧ (x ≤ c → ¬c - (↑(#s) : ℤ) < x)
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c x : ℤ mx : x ∈ s ∧ ¬(c - (↑(#s) : ℤ) < x ∧ x ≤ c) ⊢ x ≤ c - (↑(#s) : ℤ)
have := mx.2 (hs _ mx.1)
bc
¬c - (↑(#s) : ℤ) < x
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c x : ℤ mx : x ∈ s ∧ (x ≤ c → ¬c - (↑(#s) : ℤ) < x) ⊢ x ≤ c - (↑(#s) : ℤ)
rw [inter_comm, card_sdiff_comm]
rw
#s = #r
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c ⊢ ∑ x ∈ s ∩ r, x + #(s \ r) • (c - (↑(#s) : ℤ)) = ∑ x ∈ r ∩ s, x + #(r \ s) • (c - (↑(#s) : ℤ))
inter_comm,
this
∑ x ∈ r ∩ s, x + #(s \ r) • (c - (↑(#s) : ℤ)) = ∑ x ∈ r ∩ s, x + #(r \ s) • (c - (↑(#s) : ℤ))
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c ⊢ ∑ x ∈ s ∩ r, x + #(s \ r) • (c - (↑(#s) : ℤ)) = ∑ x ∈ r ∩ s, x + #(r \ s) • (c - (↑(#s) : ℤ))
card_sdiff_comm
card_sdiff_comm
∑ x ∈ r ∩ s, x + #(r \ s) • (c - (↑(#s) : ℤ)) = ∑ x ∈ r ∩ s, x + #(r \ s) • (c - (↑(#s) : ℤ))
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c ⊢ ∑ x ∈ r ∩ s, x + #(s \ r) • (c - (↑(#s) : ℤ)) = ∑ x ∈ r ∩ s, x + #(r \ s) • (c - (↑(#s) : ℤ))
card_sdiff_comm
card_sdiff_comm
#s = #r
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c card_sdiff_comm : ∑ x ∈ r ∩ s, x + #(r \ s) • (c - (↑(#s) : ℤ)) = ∑ x ∈ r ∩ s, x + #(r \ s) • (c - (↑(#s) : ℤ)) ⊢ ∑ x ∈ r ∩ s, x + #(s \ r) • (c - (↑(#s) : ℤ)) = ∑ x ∈ r ∩ s, x + #(r \ s) • (c - (↑(#s) : ℤ))
Int.card_Ioc,
this
#s = (c - (c - (↑(#s) : ℤ))).toNat
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c ⊢ #s = #r
sub_sub_cancel,
this
#s = (↑(#s) : ℤ).toNat
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c ⊢ #s = (c - (c - (↑(#s) : ℤ))).toNat
Int.toNat_natCast
this
#s = #s
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c ⊢ #s = (↑(#s) : ℤ).toNat
rw [← sum_inter_add_sum_diff r s _]
rw
∑ x ∈ r ∩ s, x + #(r \ s) • (c - (↑(#s) : ℤ)) ≤ ∑ x ∈ r ∩ s, x + ∑ x ∈ r \ s, x
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c ⊢ ∑ x ∈ r ∩ s, x + #(r \ s) • (c - (↑(#s) : ℤ)) ≤ ∑ x ∈ r, x
← sum_inter_add_sum_diff r s _
sum_inter_add_sum_diff
∑ x ∈ r ∩ s, x + #(r \ s) • (c - (↑(#s) : ℤ)) ≤ ∑ x ∈ r ∩ s, x + ∑ x ∈ r \ s, x
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c ⊢ ∑ x ∈ r ∩ s, x + #(r \ s) • (c - (↑(#s) : ℤ)) ≤ ∑ x ∈ r, x
gcongr
bc
#(r \ s) • (c - (↑(#s) : ℤ)) ≤ ∑ x ∈ r \ s, x
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c ⊢ ∑ x ∈ r ∩ s, x + #(r \ s) • (c - (↑(#s) : ℤ)) ≤ ∑ x ∈ r ∩ s, x + ∑ x ∈ r \ s, x
refine card_nsmul_le_sum _ _ _ fun x mx ↦ ?_
bc
x ∈ r \ s → c - (↑(#s) : ℤ) ≤ x
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c ⊢ #(r \ s) • (c - (↑(#s) : ℤ)) ≤ ∑ x ∈ r \ s, x
rw [mem_sdiff, mem_Ioc] at mx
bc
(c - (↑(#s) : ℤ) < x ∧ x ≤ c) ∧ x ∉ s
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c x : ℤ mx : x ∈ r \ s ⊢ c - (↑(#s) : ℤ) ≤ x
mem_sdiff,
bc
x ∈ r ∧ x ∉ s
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c x : ℤ mx : x ∈ r \ s ⊢ c - (↑(#s) : ℤ) ≤ x
mem_Ioc
bc
(c - (↑(#s) : ℤ) < x ∧ x ≤ c) ∧ x ∉ s
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c r : Finset ℤ := Ioc (c - (↑(#s) : ℤ)) c x : ℤ mx : x ∈ r ∧ x ∉ s ⊢ c - (↑(#s) : ℤ) ≤ x
convert sum_le_sum_Ioc hs
h
∑ n ∈ range #s, (c - (↑n : ℤ)) = ∑ x ∈ Ioc (c - (↑(#s) : ℤ)) c, x
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c ⊢ ∑ x ∈ s, x ≤ ∑ n ∈ range #s, (c - (↑n : ℤ))
refine sum_nbij (c - ·) ?_ ?_ ?_ (fun _ _ ↦ rfl)
h
∀ a ∈ range #s, (fun x ↦ c - (↑x : ℤ)) a ∈ Ioc (c - (↑(#s) : ℤ)) c
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c ⊢ ∑ n ∈ range #s, (c - (↑n : ℤ)) = ∑ x ∈ Ioc (c - (↑(#s) : ℤ)) c, x
refine sum_nbij (c - ·) ?_ ?_ ?_ (fun _ _ ↦ rfl)
h
Set.InjOn (fun x ↦ c - (↑x : ℤ)) (↑(range #s) : Set ℕ)
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c h : ∀ a ∈ range #s, (fun x ↦ c - (↑x : ℤ)) a ∈ Ioc (c - (↑(#s) : ℤ)) c ⊢ ∑ n ∈ range #s, (c - (↑n : ℤ)) = ∑ x ∈ Ioc (c - (↑(#s) : ℤ)) c, x
refine sum_nbij (c - ·) ?_ ?_ ?_ (fun _ _ ↦ rfl)
h
Set.SurjOn (fun x ↦ c - (↑x : ℤ)) (↑(range #s) : Set ℕ) (↑(Ioc (c - (↑(#s) : ℤ)) c) : Set ℤ)
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c h : ∀ a ∈ range #s, (fun x ↦ c - (↑x : ℤ)) a ∈ Ioc (c - (↑(#s) : ℤ)) c h₁ : Set.InjOn (fun x ↦ c - (↑x : ℤ)) (↑(range #s) : Set ℕ) ⊢ ∑ n ∈ range #s, (c - (↑n : ℤ)) = ∑ x ∈ Ioc (c - (↑(#s) : ℤ)) c, x
rw [mem_Ioc]
h
c - (↑(#s) : ℤ) < (fun x ↦ c - (↑x : ℤ)) x ∧ (fun x ↦ c - (↑x : ℤ)) x ≤ c
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c x : ℕ mx : x ∈ range #s ⊢ (fun x ↦ c - (↑x : ℤ)) x ∈ Ioc (c - (↑(#s) : ℤ)) c
mem_Ioc
h
c - (↑(#s) : ℤ) < (fun x ↦ c - (↑x : ℤ)) x ∧ (fun x ↦ c - (↑x : ℤ)) x ≤ c
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c x : ℕ mx : x ∈ range #s ⊢ (fun x ↦ c - (↑x : ℤ)) x ∈ Ioc (c - (↑(#s) : ℤ)) c
rw [mem_range] at mx
h
x < #s
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c x : ℕ mx : x ∈ range #s ⊢ c - (↑(#s) : ℤ) < c - (↑x : ℤ) ∧ c - (↑x : ℤ) ≤ c
mem_range
h
x < #s
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c x : ℕ mx : x ∈ range #s ⊢ c - (↑(#s) : ℤ) < c - (↑x : ℤ) ∧ c - (↑x : ℤ) ≤ c
simp_rw [coe_range, Set.mem_image, Set.mem_Iio]
h
∃ x_1 < #s, c - (↑x_1 : ℤ) = x
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c x : ℤ mx : x ∈ (↑(Ioc (c - (↑(#s) : ℤ)) c) : Set ℤ) ⊢ x ∈ (fun x ↦ c - (↑x : ℤ)) '' (↑(range #s) : Set ℕ)
rw [mem_coe, mem_Ioc] at mx
h
c - (↑(#s) : ℤ) < x ∧ x ≤ c
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c x : ℤ mx : x ∈ (↑(Ioc (c - (↑(#s) : ℤ)) c) : Set ℤ) ⊢ ∃ x_1 < #s, c - (↑x_1 : ℤ) = x
mem_coe,
h
x ∈ Ioc (c - (↑(#s) : ℤ)) c
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c x : ℤ mx : x ∈ (↑(Ioc (c - (↑(#s) : ℤ)) c) : Set ℤ) ⊢ ∃ x_1 < #s, c - (↑x_1 : ℤ) = x
mem_Ioc
h
c - (↑(#s) : ℤ) < x ∧ x ≤ c
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c x : ℤ mx : x ∈ Ioc (c - (↑(#s) : ℤ)) c ⊢ ∃ x_1 < #s, c - (↑x_1 : ℤ) = x
use (c - x).toNat
h
(c - x).toNat < #s ∧ c - (↑(c - x).toNat : ℤ) = x
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, x ≤ c x : ℤ mx : c - (↑(#s) : ℤ) < x ∧ x ≤ c ⊢ ∃ x_1 < #s, c - (↑x_1 : ℤ) = x
set r := Ico c (c + #s)
set
∑ x ∈ r, x ≤ ∑ x ∈ s, x
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, c ≤ x ⊢ ∑ x ∈ Ico c (c + (↑(#s) : ℤ)), x ≤ ∑ x ∈ s, x
rw [← sum_inter_add_sum_diff r s _]
rw
∑ x ∈ r ∩ s, x + ∑ x ∈ r \ s, x ≤ ∑ x ∈ r ∩ s, x + #(r \ s) • (c + (↑(#s) : ℤ))
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, c ≤ x r : Finset ℤ := Ico c (c + (↑(#s) : ℤ)) ⊢ ∑ x ∈ r, x ≤ ∑ x ∈ r ∩ s, x + #(r \ s) • (c + (↑(#s) : ℤ))
← sum_inter_add_sum_diff r s _
sum_inter_add_sum_diff
∑ x ∈ r ∩ s, x + ∑ x ∈ r \ s, x ≤ ∑ x ∈ r ∩ s, x + #(r \ s) • (c + (↑(#s) : ℤ))
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, c ≤ x r : Finset ℤ := Ico c (c + (↑(#s) : ℤ)) ⊢ ∑ x ∈ r, x ≤ ∑ x ∈ r ∩ s, x + #(r \ s) • (c + (↑(#s) : ℤ))
refine add_le_add_left (sum_le_card_nsmul _ _ _ fun x mx ↦ ?_) _
refine
x ∈ r \ s → x ≤ c + (↑(#s) : ℤ)
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, c ≤ x r : Finset ℤ := Ico c (c + (↑(#s) : ℤ)) ⊢ ∑ x ∈ r ∩ s, x + ∑ x ∈ r \ s, x ≤ ∑ x ∈ r ∩ s, x + #(r \ s) • (c + (↑(#s) : ℤ))
rw [mem_sdiff, mem_Ico] at mx
rw
(c ≤ x ∧ x < c + (↑(#s) : ℤ)) ∧ x ∉ s
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, c ≤ x r : Finset ℤ := Ico c (c + (↑(#s) : ℤ)) x : ℤ mx : x ∈ r \ s ⊢ x ≤ c + (↑(#s) : ℤ)
mem_sdiff,
this
x ∈ r ∧ x ∉ s
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, c ≤ x r : Finset ℤ := Ico c (c + (↑(#s) : ℤ)) x : ℤ mx : x ∈ r \ s ⊢ x ≤ c + (↑(#s) : ℤ)
mem_Ico
mem_Ico
(c ≤ x ∧ x < c + (↑(#s) : ℤ)) ∧ x ∉ s
s : Finset ℤ c : ℤ hs : ∀ x ∈ s, c ≤ x r : Finset ℤ := Ico c (c + (↑(#s) : ℤ)) x : ℤ mx : x ∈ r ∧ x ∉ s ⊢ x ≤ c + (↑(#s) : ℤ)