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

tactic: apply List.prod_eq_zero
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
x y : ↑(π C fun x => x ∈ s)
h : y ≠ x
⊢ (List.map (⇑(LocallyConstant.evalMonoidHom y)) (factors C s x)).prod = 0
state_after: case a
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x y : ↑(π C fun x => x ∈ s)
h : y ≠ x
⊢ 0 ∈ List.map (⇑(LocallyConstant.evalMonoidHom y)) (factors C s x)

tactic: simp only [List.mem_map]
state_before: case a
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x y : ↑(π C fun x => x ∈ s)
h : y ≠ x
⊢ 0 ∈ List.map (⇑(LocallyConstant.evalMonoidHom y)) (factors C s x)
state_after: case a
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x y : ↑(π C fun x => x ∈ s)
h : y ≠ x
⊢ ∃ a ∈ factors C s x, (LocallyConstant.evalMonoidHom y) a = 0

tactic: obtain ⟨a, ha⟩ : ∃ a, y.val a ≠ x.val a := by contrapose! h; ext; apply h
state_before: case a
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x y : ↑(π C fun x => x ∈ s)
h : y ≠ x
⊢ ∃ a ∈ factors C s x, (LocallyConstant.evalMonoidHom y) a = 0
state_after: case a.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 y : ↑(π C fun x => x ∈ s)
h : y ≠ x
a : I
ha : ↑y a ≠ ↑x a
⊢ ∃ a ∈ factors C s x, (LocallyConstant.evalMonoidHom y) a = 0

tactic: cases hx : x.val a
state_before: case a.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 y : ↑(π C fun x => x ∈ s)
h : y ≠ x
a : I
ha : ↑y a ≠ ↑x a
⊢ ∃ a ∈ factors C s x, (LocallyConstant.evalMonoidHom y) a = 0
state_after: case a.intro.false
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x y : ↑(π C fun x => x ∈ s)
h : y ≠ x
a : I
ha : ↑y a ≠ ↑x a
hx : ↑x a = false
⊢ ∃ a ∈ factors C s x, (LocallyConstant.evalMonoidHom y) a = 0

case a.intro.true
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x y : ↑(π C fun x => x ∈ s)
h : y ≠ x
a : I
ha : ↑y a ≠ ↑x a
hx : ↑x a = true
⊢ ∃ a ∈ factors C s x, (LocallyConstant.evalMonoidHom y) a = 0

tactic: contrapose! h
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
x y : ↑(π C fun x => x ∈ s)
h : y ≠ x
⊢ ∃ a, ↑y a ≠ ↑x a
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
x y : ↑(π C fun x => x ∈ s)
h : ∀ (a : I), ↑y a = ↑x a
⊢ y = x

tactic: ext
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
x y : ↑(π C fun x => x ∈ s)
h : ∀ (a : I), ↑y a = ↑x a
⊢ y = x
state_after: case a.h
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x y : ↑(π C fun x => x ∈ s)
h : ∀ (a : I), ↑y a = ↑x a
x✝ : I
⊢ ↑y x✝ = ↑x x✝

tactic: apply h
state_before: case a.h
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x y : ↑(π C fun x => x ∈ s)
h : ∀ (a : I), ↑y a = ↑x a
x✝ : I
⊢ ↑y x✝ = ↑x x✝
state_after: no goals

tactic: rw [hx, ne_eq, Bool.not_eq_false] at ha
state_before: case a.intro.false
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x y : ↑(π C fun x => x ∈ s)
h : y ≠ x
a : I
ha : ↑y a ≠ ↑x a
hx : ↑x a = false
⊢ ∃ a ∈ factors C s x, (LocallyConstant.evalMonoidHom y) a = 0
state_after: case a.intro.false
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x y : ↑(π C fun x => x ∈ s)
h : y ≠ x
a : I
ha : ↑y a = true
hx : ↑x a = false
⊢ ∃ a ∈ factors C s x, (LocallyConstant.evalMonoidHom y) a = 0

tactic: rw [e, LocallyConstant.evalMonoidHom_apply, LocallyConstant.sub_apply,
  LocallyConstant.coe_one, Pi.one_apply, LocallyConstant.coe_mk, if_pos ha, sub_self]
state_before: case a.intro.false
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x y : ↑(π C fun x => x ∈ s)
h : y ≠ x
a : I
ha : ↑y a = true
hx : ↑x a = false
⊢ (LocallyConstant.evalMonoidHom y) (1 - e (π C fun x => x ∈ s) a) = 0
state_after: no goals

tactic: rw [hx] at ha
state_before: case a.intro.true
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x y : ↑(π C fun x => x ∈ s)
h : y ≠ x
a : I
ha : ↑y a ≠ ↑x a
hx : ↑x a = true
⊢ (LocallyConstant.evalMonoidHom y) (e (π C fun x => x ∈ s) a) = 0
state_after: case a.intro.true
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x y : ↑(π C fun x => x ∈ s)
h : y ≠ x
a : I
ha : ↑y a ≠ true
hx : ↑x a = true
⊢ (LocallyConstant.evalMonoidHom y) (e (π C fun x => x ∈ s) a) = 0

tactic: rw [LocallyConstant.evalMonoidHom_apply, e, LocallyConstant.coe_mk, if_neg ha]
state_before: case a.intro.true
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
s : Finset I
x y : ↑(π C fun x => x ∈ s)
h : y ≠ x
a : I
ha : ↑y a ≠ true
hx : ↑x a = true
⊢ (LocallyConstant.evalMonoidHom y) (e (π C fun x => x ∈ s) a) = 0
state_after: no goals