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

tactic: change LocallyConstant.evalMonoidHom x (l.eval C) = _
state_before: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
⊢ (eval C l) x = if ∀ i ∈ ↑l, ↑x i = true then 1 else 0
state_after: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
⊢ (LocallyConstant.evalMonoidHom x) (eval C l) = if ∀ i ∈ ↑l, ↑x i = true then 1 else 0

tactic: rw [eval, map_list_prod]
state_before: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
⊢ (LocallyConstant.evalMonoidHom x) (eval C l) = if ∀ i ∈ ↑l, ↑x i = true then 1 else 0
state_after: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
⊢ (List.map (⇑(LocallyConstant.evalMonoidHom x)) (List.map (e C) ↑l)).prod = if ∀ i ∈ ↑l, ↑x i = true then 1 else 0

tactic: split_ifs with h
state_before: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
⊢ (List.map (⇑(LocallyConstant.evalMonoidHom x)) (List.map (e C) ↑l)).prod = if ∀ i ∈ ↑l, ↑x i = true then 1 else 0
state_after: case pos
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ∀ i ∈ ↑l, ↑x i = true
⊢ (List.map (⇑(LocallyConstant.evalMonoidHom x)) (List.map (e C) ↑l)).prod = 1

case neg
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ¬∀ i ∈ ↑l, ↑x i = true
⊢ (List.map (⇑(LocallyConstant.evalMonoidHom x)) (List.map (e C) ↑l)).prod = 0

tactic: simp only [List.map_map]
state_before: case pos
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ∀ i ∈ ↑l, ↑x i = true
⊢ (List.map (⇑(LocallyConstant.evalMonoidHom x)) (List.map (e C) ↑l)).prod = 1
state_after: case pos
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ∀ i ∈ ↑l, ↑x i = true
⊢ (List.map (⇑(LocallyConstant.evalMonoidHom x) ∘ e C) ↑l).prod = 1

tactic: apply List.prod_eq_one
state_before: case pos
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ∀ i ∈ ↑l, ↑x i = true
⊢ (List.map (⇑(LocallyConstant.evalMonoidHom x) ∘ e C) ↑l).prod = 1
state_after: case pos.hl
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ∀ i ∈ ↑l, ↑x i = true
⊢ ∀ x_1 ∈ List.map (⇑(LocallyConstant.evalMonoidHom x) ∘ e C) ↑l, x_1 = 1

tactic: simp only [List.mem_map, Function.comp_apply]
state_before: case pos.hl
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ∀ i ∈ ↑l, ↑x i = true
⊢ ∀ x_1 ∈ List.map (⇑(LocallyConstant.evalMonoidHom x) ∘ e C) ↑l, x_1 = 1
state_after: case pos.hl
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ∀ i ∈ ↑l, ↑x i = true
⊢ ∀ (x_1 : ℤ), (∃ a ∈ ↑l, (LocallyConstant.evalMonoidHom x) (e C a) = x_1) → x_1 = 1

tactic: rintro _ ⟨i, hi, rfl⟩
state_before: case pos.hl
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ∀ i ∈ ↑l, ↑x i = true
⊢ ∀ (x_1 : ℤ), (∃ a ∈ ↑l, (LocallyConstant.evalMonoidHom x) (e C a) = x_1) → x_1 = 1
state_after: case pos.hl.intro.intro
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ∀ i ∈ ↑l, ↑x i = true
i : I
hi : i ∈ ↑l
⊢ (LocallyConstant.evalMonoidHom x) (e C i) = 1

tactic: exact if_pos (h i hi)
state_before: case pos.hl.intro.intro
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ∀ i ∈ ↑l, ↑x i = true
i : I
hi : i ∈ ↑l
⊢ (LocallyConstant.evalMonoidHom x) (e C i) = 1
state_after: no goals

tactic: simp only [List.map_map, List.prod_eq_zero_iff, List.mem_map, Function.comp_apply]
state_before: case neg
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ¬∀ i ∈ ↑l, ↑x i = true
⊢ (List.map (⇑(LocallyConstant.evalMonoidHom x)) (List.map (e C) ↑l)).prod = 0
state_after: case neg
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ¬∀ i ∈ ↑l, ↑x i = true
⊢ ∃ a ∈ ↑l, (LocallyConstant.evalMonoidHom x) (e C a) = 0

tactic: push_neg at h
state_before: case neg
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ¬∀ i ∈ ↑l, ↑x i = true
⊢ ∃ a ∈ ↑l, (LocallyConstant.evalMonoidHom x) (e C a) = 0
state_after: case neg
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ∃ i ∈ ↑l, ↑x i ≠ true
⊢ ∃ a ∈ ↑l, (LocallyConstant.evalMonoidHom x) (e C a) = 0

tactic: convert h with i
state_before: case neg
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ∃ i ∈ ↑l, ↑x i ≠ true
⊢ ∃ a ∈ ↑l, (LocallyConstant.evalMonoidHom x) (e C a) = 0
state_after: case h.e'_2.h.h.e'_2.a
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ∃ i ∈ ↑l, ↑x i ≠ true
i : I
⊢ (LocallyConstant.evalMonoidHom x) (e C i) = 0 ↔ ↑x i ≠ true

tactic: dsimp [LocallyConstant.evalMonoidHom, e]
state_before: case h.e'_2.h.h.e'_2.a
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ∃ i ∈ ↑l, ↑x i ≠ true
i : I
⊢ (LocallyConstant.evalMonoidHom x) (e C i) = 0 ↔ ↑x i ≠ true
state_after: case h.e'_2.h.h.e'_2.a
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ∃ i ∈ ↑l, ↑x i ≠ true
i : I
⊢ (if ↑x i = true then 1 else 0) = 0 ↔ ¬↑x i = true

tactic: simp only [ite_eq_right_iff, one_ne_zero]
state_before: case h.e'_2.h.h.e'_2.a
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
l : Products I
x : ↑C
h : ∃ i ∈ ↑l, ↑x i ≠ true
i : I
⊢ (if ↑x i = true then 1 else 0) = 0 ↔ ¬↑x i = true
state_after: no goals