l3lab/ntp-mathlib huggingface dataset:
/-- Concatenation of two `GenLoop`s along the `i`th coordinate. -/
def transAt (i : N) (f g : Ω^ N X x) : Ω^ N X x :=
  copy (fromLoop i <| (toLoop i f).trans <| toLoop i g)
    (fun t => if (t i : ℝ) ≤ 1 / 2
      then f (Function.update t i <| Set.projIcc 0 1 zero_le_one (2 * t i))
      else g (Function.update t i <| Set.projIcc 0 1 zero_le_one (2 * t i - 1)))
    (by
      ext1; symm
      dsimp only [Path.trans, fromLoop, Path.coe_mk_mk, Function.comp_apply, mk_apply,
        ContinuousMap.comp_apply, toContinuousMap_apply, funSplitAt_apply,
        ContinuousMap.uncurry_apply, ContinuousMap.coe_mk, Function.uncurry_apply_pair]
      split_ifs; change f _ = _; swap; 

Proof state:
case neg
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i : N
f g : ↑(Ω^ N X x)
x✝ : N → ↑I
h✝ : ¬↑(x✝ i) ≤ 1 / 2
⊢ (↑(Path.extend (toLoop i g) (2 * ↑(x✝ i) - 1)) fun j => x✝ ↑j) =
    g (Function.update x✝ i (Set.projIcc 0 1 (_ : 0 ≤ 1) (2 * ↑(x✝ i) - 1)))
case pos
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i : N
f g : ↑(Ω^ N X x)
x✝ : N → ↑I
h✝ : ↑(x✝ i) ≤ 1 / 2
⊢ f
      ((Homeomorph.toContinuousMap (Cube.insertAt i))
        (Set.projIcc 0 1 Path.extend.proof_1 (2 * ↑(x✝ i)), fun j => x✝ ↑j)) =
    f (Function.update x✝ i (Set.projIcc 0 1 (_ : 0 ≤ 1) (2 * ↑(x✝ i))))

Next tactic:
change g _ = _
/-- Concatenation of two `GenLoop`s along the `i`th coordinate. -/
def transAt (i : N) (f g : Ω^ N X x) : Ω^ N X x :=
  copy (fromLoop i <| (toLoop i f).trans <| toLoop i g)
    (fun t => if (t i : ℝ) ≤ 1 / 2
      then f (Function.update t i <| Set.projIcc 0 1 zero_le_one (2 * t i))
      else g (Function.update t i <| Set.projIcc 0 1 zero_le_one (2 * t i - 1)))
    (by
      ext1; symm
      dsimp only [Path.trans, fromLoop, Path.coe_mk_mk, Function.comp_apply, mk_apply,
        ContinuousMap.comp_apply, toContinuousMap_apply, funSplitAt_apply,
        ContinuousMap.uncurry_apply, ContinuousMap.coe_mk, Function.uncurry_apply_pair]
      split_ifs; change f _ = _; swap; change g _ = _
      

Proof state:
case neg
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i : N
f g : ↑(Ω^ N X x)
x✝ : N → ↑I
h✝ : ¬↑(x✝ i) ≤ 1 / 2
⊢ g
      ((Homeomorph.toContinuousMap (Cube.insertAt i))
        (Set.projIcc 0 1 Path.extend.proof_1 (2 * ↑(x✝ i) - 1), fun j => x✝ ↑j)) =
    g (Function.update x✝ i (Set.projIcc 0 1 (_ : 0 ≤ 1) (2 * ↑(x✝ i) - 1)))
case pos
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i : N
f g : ↑(Ω^ N X x)
x✝ : N → ↑I
h✝ : ↑(x✝ i) ≤ 1 / 2
⊢ f
      ((Homeomorph.toContinuousMap (Cube.insertAt i))
        (Set.projIcc 0 1 Path.extend.proof_1 (2 * ↑(x✝ i)), fun j => x✝ ↑j)) =
    f (Function.update x✝ i (Set.projIcc 0 1 (_ : 0 ≤ 1) (2 * ↑(x✝ i))))

Next tactic:
all_goals congr 1
/-- Concatenation of two `GenLoop`s along the `i`th coordinate. -/
def transAt (i : N) (f g : Ω^ N X x) : Ω^ N X x :=
  copy (fromLoop i <| (toLoop i f).trans <| toLoop i g)
    (fun t => if (t i : ℝ) ≤ 1 / 2
      then f (Function.update t i <| Set.projIcc 0 1 zero_le_one (2 * t i))
      else g (Function.update t i <| Set.projIcc 0 1 zero_le_one (2 * t i - 1)))
    (by
      ext1; symm
      dsimp only [Path.trans, fromLoop, Path.coe_mk_mk, Function.comp_apply, mk_apply,
        ContinuousMap.comp_apply, toContinuousMap_apply, funSplitAt_apply,
        ContinuousMap.uncurry_apply, ContinuousMap.coe_mk, Function.uncurry_apply_pair]
      split_ifs; change f _ = _; swap; change g _ = _
      all_goals 

Proof state:
case neg
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i : N
f g : ↑(Ω^ N X x)
x✝ : N → ↑I
h✝ : ¬↑(x✝ i) ≤ 1 / 2
⊢ g
      ((Homeomorph.toContinuousMap (Cube.insertAt i))
        (Set.projIcc 0 1 Path.extend.proof_1 (2 * ↑(x✝ i) - 1), fun j => x✝ ↑j)) =
    g (Function.update x✝ i (Set.projIcc 0 1 (_ : 0 ≤ 1) (2 * ↑(x✝ i) - 1)))

Next tactic:
congr 1
/-- Concatenation of two `GenLoop`s along the `i`th coordinate. -/
def transAt (i : N) (f g : Ω^ N X x) : Ω^ N X x :=
  copy (fromLoop i <| (toLoop i f).trans <| toLoop i g)
    (fun t => if (t i : ℝ) ≤ 1 / 2
      then f (Function.update t i <| Set.projIcc 0 1 zero_le_one (2 * t i))
      else g (Function.update t i <| Set.projIcc 0 1 zero_le_one (2 * t i - 1)))
    (by
      ext1; symm
      dsimp only [Path.trans, fromLoop, Path.coe_mk_mk, Function.comp_apply, mk_apply,
        ContinuousMap.comp_apply, toContinuousMap_apply, funSplitAt_apply,
        ContinuousMap.uncurry_apply, ContinuousMap.coe_mk, Function.uncurry_apply_pair]
      split_ifs; change f _ = _; swap; change g _ = _
      all_goals 

Proof state:
case pos
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i : N
f g : ↑(Ω^ N X x)
x✝ : N → ↑I
h✝ : ↑(x✝ i) ≤ 1 / 2
⊢ f
      ((Homeomorph.toContinuousMap (Cube.insertAt i))
        (Set.projIcc 0 1 Path.extend.proof_1 (2 * ↑(x✝ i)), fun j => x✝ ↑j)) =
    f (Function.update x✝ i (Set.projIcc 0 1 (_ : 0 ≤ 1) (2 * ↑(x✝ i))))

Next tactic:
congr 1
/-- Reversal of a `GenLoop` along the `i`th coordinate. -/
def symmAt (i : N) (f : Ω^ N X x) : Ω^ N X x :=
  (copy (fromLoop i (toLoop i f).symm) fun t => f fun j => if j = i then σ (t i) else t j) <| by
    

Proof state:
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i : N
f : ↑(Ω^ N X x)
⊢ (fun t => f fun j => if j = i then σ (t i) else t j) = ⇑(fromLoop i (Path.symm (toLoop i f)))

Next tactic:
ext1
/-- Reversal of a `GenLoop` along the `i`th coordinate. -/
def symmAt (i : N) (f : Ω^ N X x) : Ω^ N X x :=
  (copy (fromLoop i (toLoop i f).symm) fun t => f fun j => if j = i then σ (t i) else t j) <| by
    ext1; 

Proof state:
case h
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i : N
f : ↑(Ω^ N X x)
x✝ : N → ↑I
⊢ (f fun j => if j = i then σ (x✝ i) else x✝ j) = (fromLoop i (Path.symm (toLoop i f))) x✝

Next tactic:
change _ = f _
/-- Reversal of a `GenLoop` along the `i`th coordinate. -/
def symmAt (i : N) (f : Ω^ N X x) : Ω^ N X x :=
  (copy (fromLoop i (toLoop i f).symm) fun t => f fun j => if j = i then σ (t i) else t j) <| by
    ext1; change _ = f _; 

Proof state:
case h
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i : N
f : ↑(Ω^ N X x)
x✝ : N → ↑I
⊢ (f fun j => if j = i then σ (x✝ i) else x✝ j) =
    f
      ((Homeomorph.toContinuousMap (Cube.insertAt i))
        (σ ((Homeomorph.toContinuousMap (Cube.splitAt i)) x✝).1, ((Homeomorph.toContinuousMap (Cube.splitAt i)) x✝).2))

Next tactic:
congr
/-- Reversal of a `GenLoop` along the `i`th coordinate. -/
def symmAt (i : N) (f : Ω^ N X x) : Ω^ N X x :=
  (copy (fromLoop i (toLoop i f).symm) fun t => f fun j => if j = i then σ (t i) else t j) <| by
    ext1; change _ = f _; congr; 

Proof state:
case h.h.e_6.h
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i : N
f : ↑(Ω^ N X x)
x✝ : N → ↑I
⊢ (fun j => if j = i then σ (x✝ i) else x✝ j) =
    (Homeomorph.toContinuousMap (Cube.insertAt i))
      (σ ((Homeomorph.toContinuousMap (Cube.splitAt i)) x✝).1, ((Homeomorph.toContinuousMap (Cube.splitAt i)) x✝).2)

Next tactic:
ext1
/-- Reversal of a `GenLoop` along the `i`th coordinate. -/
def symmAt (i : N) (f : Ω^ N X x) : Ω^ N X x :=
  (copy (fromLoop i (toLoop i f).symm) fun t => f fun j => if j = i then σ (t i) else t j) <| by
    ext1; change _ = f _; congr; ext1; 

Proof state:
case h.h.e_6.h.h
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i : N
f : ↑(Ω^ N X x)
x✝¹ : N → ↑I
x✝ : N
⊢ (if x✝ = i then σ (x✝¹ i) else x✝¹ x✝) =
    (Homeomorph.toContinuousMap (Cube.insertAt i))
      (σ ((Homeomorph.toContinuousMap (Cube.splitAt i)) x✝¹).1, ((Homeomorph.toContinuousMap (Cube.splitAt i)) x✝¹).2)
      x✝

Next tactic:
simp
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  

Proof state:
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i j : N
h : i ≠ j
a b c d : ↑(Ω^ N X x)
⊢ transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d)

Next tactic:
ext
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; 

Proof state:
case H
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i j : N
h : i ≠ j
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
⊢ (transAt i (transAt j a b) (transAt j c d)) y✝ = (transAt j (transAt i a c) (transAt i b d)) y✝

Next tactic:
simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
  

Proof state:
case H
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i j : N
h : i ≠ j
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
⊢ (if ↑(y✝ i) ≤ 1 / 2 then
      if ↑(y✝ j) ≤ 1 / 2 then
        a
          (Function.update (Function.update y✝ i (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i)))) j
            (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j))))
      else
        b
          (Function.update (Function.update y✝ i (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i)))) j
            (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j) - 1)))
    else
      if ↑(y✝ j) ≤ 1 / 2 then
        c
          (Function.update (Function.update y✝ i (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i) - 1))) j
            (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j))))
      else
        d
          (Function.update (Function.update y✝ i (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i) - 1))) j
            (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j) - 1)))) =
    if ↑(y✝ j) ≤ 1 / 2 then
      if ↑(y✝ i) ≤ 1 / 2 then
        a
          (Function.update (Function.update y✝ j (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j)))) i
            (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i))))
      else
        c
          (Function.update (Function.update y✝ j (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j)))) i
            (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i) - 1)))
    else
      if ↑(y✝ i) ≤ 1 / 2 then
        b
          (Function.update (Function.update y✝ j (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j) - 1))) i
            (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i))))
      else
        d
          (Function.update (Function.update y✝ j (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j) - 1))) i
            (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i) - 1)))

Next tactic:
split_ifs
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
  split_ifs <;>
    · 

Proof state:
case pos
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i j : N
h : i ≠ j
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
h✝¹ : ↑(y✝ i) ≤ 1 / 2
h✝ : ↑(y✝ j) ≤ 1 / 2
⊢ a
      (Function.update (Function.update y✝ i (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i)))) j
        (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j)))) =
    a
      (Function.update (Function.update y✝ j (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j)))) i
        (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i))))

Next tactic:
congr 1
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
  split_ifs <;>
    · congr 1; 

Proof state:
case pos.h.e_6.h
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i j : N
h : i ≠ j
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
h✝¹ : ↑(y✝ i) ≤ 1 / 2
h✝ : ↑(y✝ j) ≤ 1 / 2
⊢ Function.update (Function.update y✝ i (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i)))) j
      (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j))) =
    Function.update (Function.update y✝ j (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j)))) i
      (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i)))

Next tactic:
ext1
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
  split_ifs <;>
    · congr 1; ext1; 

Proof state:
case pos.h.e_6.h.h
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i j : N
h : i ≠ j
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
h✝¹ : ↑(y✝ i) ≤ 1 / 2
h✝ : ↑(y✝ j) ≤ 1 / 2
x✝ : N
⊢ Function.update (Function.update y✝ i (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i)))) j
      (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j))) x✝ =
    Function.update (Function.update y✝ j (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j)))) i
      (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i))) x✝

Next tactic:
simp only [Function.update, eq_rec_constant, dite_eq_ite]
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
  split_ifs <;>
    · congr 1; ext1; simp only [Function.update, eq_rec_constant, dite_eq_ite]
      

Proof state:
case pos.h.e_6.h.h
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i j : N
h : i ≠ j
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
h✝¹ : ↑(y✝ i) ≤ 1 / 2
h✝ : ↑(y✝ j) ≤ 1 / 2
x✝ : N
⊢ (if x✝ = j then Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j))
    else if x✝ = i then Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i)) else y✝ x✝) =
    if x✝ = i then Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i))
    else if x✝ = j then Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j)) else y✝ x✝

Next tactic:
apply ite_ite_comm
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
  split_ifs <;>
    · congr 1; ext1; simp only [Function.update, eq_rec_constant, dite_eq_ite]
      apply ite_ite_comm; 

Proof state:
case pos.h.e_6.h.h.h
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i j : N
h : i ≠ j
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
h✝¹ : ↑(y✝ i) ≤ 1 / 2
h✝ : ↑(y✝ j) ≤ 1 / 2
x✝ : N
⊢ x✝ = j → ¬x✝ = i

Next tactic:
rintro rfl
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
  split_ifs <;>
    · congr 1; ext1; simp only [Function.update, eq_rec_constant, dite_eq_ite]
      apply ite_ite_comm; rintro rfl; 

Proof state:
case pos.h.e_6.h.h.h
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i : N
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
h✝¹ : ↑(y✝ i) ≤ 1 / 2
x✝ : N
h : i ≠ x✝
h✝ : ↑(y✝ x✝) ≤ 1 / 2
⊢ ¬x✝ = i

Next tactic:
exact h.symm
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
  split_ifs <;>
    · 

Proof state:
case neg
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i j : N
h : i ≠ j
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
h✝¹ : ↑(y✝ i) ≤ 1 / 2
h✝ : ¬↑(y✝ j) ≤ 1 / 2
⊢ b
      (Function.update (Function.update y✝ i (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i)))) j
        (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j) - 1))) =
    b
      (Function.update (Function.update y✝ j (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j) - 1))) i
        (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i))))

Next tactic:
congr 1
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
  split_ifs <;>
    · congr 1; 

Proof state:
case neg.h.e_6.h
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i j : N
h : i ≠ j
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
h✝¹ : ↑(y✝ i) ≤ 1 / 2
h✝ : ¬↑(y✝ j) ≤ 1 / 2
⊢ Function.update (Function.update y✝ i (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i)))) j
      (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j) - 1)) =
    Function.update (Function.update y✝ j (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j) - 1))) i
      (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i)))

Next tactic:
ext1
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
  split_ifs <;>
    · congr 1; ext1; 

Proof state:
case neg.h.e_6.h.h
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i j : N
h : i ≠ j
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
h✝¹ : ↑(y✝ i) ≤ 1 / 2
h✝ : ¬↑(y✝ j) ≤ 1 / 2
x✝ : N
⊢ Function.update (Function.update y✝ i (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i)))) j
      (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j) - 1)) x✝ =
    Function.update (Function.update y✝ j (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j) - 1))) i
      (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i))) x✝

Next tactic:
simp only [Function.update, eq_rec_constant, dite_eq_ite]
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
  split_ifs <;>
    · congr 1; ext1; simp only [Function.update, eq_rec_constant, dite_eq_ite]
      

Proof state:
case neg.h.e_6.h.h
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i j : N
h : i ≠ j
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
h✝¹ : ↑(y✝ i) ≤ 1 / 2
h✝ : ¬↑(y✝ j) ≤ 1 / 2
x✝ : N
⊢ (if x✝ = j then Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j) - 1)
    else if x✝ = i then Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i)) else y✝ x✝) =
    if x✝ = i then Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i))
    else if x✝ = j then Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j) - 1) else y✝ x✝

Next tactic:
apply ite_ite_comm
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
  split_ifs <;>
    · congr 1; ext1; simp only [Function.update, eq_rec_constant, dite_eq_ite]
      apply ite_ite_comm; 

Proof state:
case neg.h.e_6.h.h.h
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i j : N
h : i ≠ j
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
h✝¹ : ↑(y✝ i) ≤ 1 / 2
h✝ : ¬↑(y✝ j) ≤ 1 / 2
x✝ : N
⊢ x✝ = j → ¬x✝ = i

Next tactic:
rintro rfl
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
  split_ifs <;>
    · congr 1; ext1; simp only [Function.update, eq_rec_constant, dite_eq_ite]
      apply ite_ite_comm; rintro rfl; 

Proof state:
case neg.h.e_6.h.h.h
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i : N
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
h✝¹ : ↑(y✝ i) ≤ 1 / 2
x✝ : N
h : i ≠ x✝
h✝ : ¬↑(y✝ x✝) ≤ 1 / 2
⊢ ¬x✝ = i

Next tactic:
exact h.symm
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
  split_ifs <;>
    · 

Proof state:
case pos
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i j : N
h : i ≠ j
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
h✝¹ : ¬↑(y✝ i) ≤ 1 / 2
h✝ : ↑(y✝ j) ≤ 1 / 2
⊢ c
      (Function.update (Function.update y✝ i (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i) - 1))) j
        (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j)))) =
    c
      (Function.update (Function.update y✝ j (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j)))) i
        (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i) - 1)))

Next tactic:
congr 1
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
  split_ifs <;>
    · congr 1; 

Proof state:
case pos.h.e_6.h
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i j : N
h : i ≠ j
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
h✝¹ : ¬↑(y✝ i) ≤ 1 / 2
h✝ : ↑(y✝ j) ≤ 1 / 2
⊢ Function.update (Function.update y✝ i (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i) - 1))) j
      (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j))) =
    Function.update (Function.update y✝ j (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j)))) i
      (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i) - 1))

Next tactic:
ext1
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
  split_ifs <;>
    · congr 1; ext1; 

Proof state:
case pos.h.e_6.h.h
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i j : N
h : i ≠ j
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
h✝¹ : ¬↑(y✝ i) ≤ 1 / 2
h✝ : ↑(y✝ j) ≤ 1 / 2
x✝ : N
⊢ Function.update (Function.update y✝ i (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i) - 1))) j
      (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j))) x✝ =
    Function.update (Function.update y✝ j (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j)))) i
      (Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i) - 1)) x✝

Next tactic:
simp only [Function.update, eq_rec_constant, dite_eq_ite]
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
  split_ifs <;>
    · congr 1; ext1; simp only [Function.update, eq_rec_constant, dite_eq_ite]
      

Proof state:
case pos.h.e_6.h.h
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i j : N
h : i ≠ j
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
h✝¹ : ¬↑(y✝ i) ≤ 1 / 2
h✝ : ↑(y✝ j) ≤ 1 / 2
x✝ : N
⊢ (if x✝ = j then Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j))
    else if x✝ = i then Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i) - 1) else y✝ x✝) =
    if x✝ = i then Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ i) - 1)
    else if x✝ = j then Set.projIcc 0 1 transAt.proof_2 (2 * ↑(y✝ j)) else y✝ x✝

Next tactic:
apply ite_ite_comm
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d) := by
  ext; simp_rw [transAt, coe_copy, Function.update_apply, if_neg h, if_neg h.symm]
  split_ifs <;>
    · congr 1; ext1; simp only [Function.update, eq_rec_constant, dite_eq_ite]
      apply ite_ite_comm; 

Proof state:
case pos.h.e_6.h.h.h
N : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace X
x : X
inst✝ : DecidableEq N
i j : N
h : i ≠ j
a b c d : ↑(Ω^ N X x)
y✝ : N → ↑I
h✝¹ : ¬↑(y✝ i) ≤ 1 / 2
h✝ : ↑(y✝ j) ≤ 1 / 2
x✝ : N
⊢ x✝ = j → ¬x✝ = i

Next tactic:
rintro rfl