Theorem: Profinite.NobelingProof.GoodProducts.spanFin
File: Mathlib/Topology/Category/Profinite/Nobeling.lean

Proof steps:
state_before: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
⊢ ⊤ ≤ Submodule.span ℤ (Set.range (eval (π C fun x => x ∈ s)))
state_after: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
⊢ ⊤ ≤ Submodule.span ℤ (Set.range (Products.eval (π C fun x => x ∈ s)))
tactic: rw [span_iff_products]
state_before: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
⊢ ⊤ ≤ Submodule.span ℤ (Set.range (Products.eval (π C fun x => x ∈ s)))
state_after: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
⊢ Submodule.span ℤ (Set.range (spanFinBasis C s)) ≤ Submodule.span ℤ (Set.range (Products.eval (π C fun x => x ∈ s)))
tactic: refine le_trans (spanFinBasis.span C s) ?_
state_before: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
⊢ Submodule.span ℤ (Set.range (spanFinBasis C s)) ≤ Submodule.span ℤ (Set.range (Products.eval (π C fun x => x ∈ s)))
state_after: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
⊢ Set.range (spanFinBasis C s) ⊆ ↑(Submodule.span ℤ (Set.range (Products.eval (π C fun x => x ∈ s))))
tactic: rw [Submodule.span_le]
state_before: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
⊢ Set.range (spanFinBasis C s) ⊆ ↑(Submodule.span ℤ (Set.range (Products.eval (π C fun x => x ∈ s))))
state_after: case intro
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x : ↑(π C fun x => x ∈ s)
⊢ spanFinBasis C s x ∈ ↑(Submodule.span ℤ (Set.range (Products.eval (π C fun x => x ∈ s))))
tactic: rintro _ ⟨x, rfl⟩
state_before: case intro
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x : ↑(π C fun x => x ∈ s)
⊢ spanFinBasis C s x ∈ ↑(Submodule.span ℤ (Set.range (Products.eval (π C fun x => x ∈ s))))
state_after: case intro
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x : ↑(π C fun x => x ∈ s)
⊢ (factors C s x).prod ∈ ↑(Submodule.span ℤ (Set.range (Products.eval (π C fun x => x ∈ s))))
tactic: rw [← factors_prod_eq_basis]
state_before: case intro
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x : ↑(π C fun x => x ∈ s)
l : List I := Finset.sort (fun x x_1 => x ≥ x_1) s
⊢ (factors C s x).prod ∈ ↑(Submodule.span ℤ (Set.range (Products.eval (π C fun x => x ∈ s))))
state_after: case intro
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x : ↑(π C fun x => x ∈ s)
l : List I := Finset.sort (fun x x_1 => x ≥ x_1) s
⊢ (List.map (fun i => if ↑x i = true then e (π C fun x => x ∈ s) i else 1 - e (π C fun x => x ∈ s) i)
        (Finset.sort (fun x x_1 => x ≥ x_1) s)).prod ∈
    ↑(Submodule.span ℤ (Set.range (Products.eval (π C fun x => x ∈ s))))
tactic: dsimp [factors]