l3lab/ntp-mathlib huggingface dataset:
theorem fromCoset_ne_of_nin_range {b : B} (hb : b ∉ f.range) :
    fromCoset ⟨b • ↑f.range, b, rfl⟩ ≠ fromCoset ⟨f.range, 1, one_leftCoset _⟩ := by
  intro r
  

Proof state:
A B : GroupCat
f : A ⟶ B
b : ↑B
hb : b ∉ MonoidHom.range f
r :
  fromCoset
      { val := b • ↑(MonoidHom.range f),
        property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = b • ↑(MonoidHom.range f)) } =
    fromCoset
      { val := ↑(MonoidHom.range f),
        property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = ↑(MonoidHom.range f)) }
⊢ False

Next tactic:
simp only [fromCoset.injEq, Subtype.mk.injEq] at r
theorem fromCoset_ne_of_nin_range {b : B} (hb : b ∉ f.range) :
    fromCoset ⟨b • ↑f.range, b, rfl⟩ ≠ fromCoset ⟨f.range, 1, one_leftCoset _⟩ := by
  intro r
  simp only [fromCoset.injEq, Subtype.mk.injEq] at r
  -- Porting note: annoying dance between types CoeSort.coe B, B.α, and B
  

Proof state:
A B : GroupCat
f : A ⟶ B
b : ↑B
hb : b ∉ MonoidHom.range f
r : b • ↑(MonoidHom.range f) = ↑(MonoidHom.range f)
⊢ False

Next tactic:
let b' : B.α := b
theorem fromCoset_ne_of_nin_range {b : B} (hb : b ∉ f.range) :
    fromCoset ⟨b • ↑f.range, b, rfl⟩ ≠ fromCoset ⟨f.range, 1, one_leftCoset _⟩ := by
  intro r
  simp only [fromCoset.injEq, Subtype.mk.injEq] at r
  -- Porting note: annoying dance between types CoeSort.coe B, B.α, and B
  let b' : B.α := b
  

Proof state:
A B : GroupCat
f : A ⟶ B
b : ↑B
hb : b ∉ MonoidHom.range f
r : b • ↑(MonoidHom.range f) = ↑(MonoidHom.range f)
b' : ↑B := b
⊢ False

Next tactic:
change b' • (f.range : Set B) = f.range at r
theorem fromCoset_ne_of_nin_range {b : B} (hb : b ∉ f.range) :
    fromCoset ⟨b • ↑f.range, b, rfl⟩ ≠ fromCoset ⟨f.range, 1, one_leftCoset _⟩ := by
  intro r
  simp only [fromCoset.injEq, Subtype.mk.injEq] at r
  -- Porting note: annoying dance between types CoeSort.coe B, B.α, and B
  let b' : B.α := b
  change b' • (f.range : Set B) = f.range at r
  

Proof state:
A B : GroupCat
f : A ⟶ B
b : ↑B
hb : b ∉ MonoidHom.range f
b' : ↑B := b
r : b' • ↑(MonoidHom.range f) = ↑(MonoidHom.range f)
⊢ False

Next tactic:
nth_rw 2 [show (f.range : Set B.α) = (1 : B) • f.range from (one_leftCoset _).symm] at r
theorem fromCoset_ne_of_nin_range {b : B} (hb : b ∉ f.range) :
    fromCoset ⟨b • ↑f.range, b, rfl⟩ ≠ fromCoset ⟨f.range, 1, one_leftCoset _⟩ := by
  intro r
  simp only [fromCoset.injEq, Subtype.mk.injEq] at r
  -- Porting note: annoying dance between types CoeSort.coe B, B.α, and B
  let b' : B.α := b
  change b' • (f.range : Set B) = f.range at r
  nth_rw 2 [show (f.range : Set B.α) = (1 : B) • f.range from (one_leftCoset _).symm] at r
  

Proof state:
A B : GroupCat
f : A ⟶ B
b : ↑B
hb : b ∉ MonoidHom.range f
b' : ↑B := b
r : b' • ↑(MonoidHom.range f) = 1 • ↑(MonoidHom.range f)
⊢ False

Next tactic:
rw [leftCoset_eq_iff, mul_one] at r
theorem fromCoset_ne_of_nin_range {b : B} (hb : b ∉ f.range) :
    fromCoset ⟨b • ↑f.range, b, rfl⟩ ≠ fromCoset ⟨f.range, 1, one_leftCoset _⟩ := by
  intro r
  simp only [fromCoset.injEq, Subtype.mk.injEq] at r
  -- Porting note: annoying dance between types CoeSort.coe B, B.α, and B
  let b' : B.α := b
  change b' • (f.range : Set B) = f.range at r
  nth_rw 2 [show (f.range : Set B.α) = (1 : B) • f.range from (one_leftCoset _).symm] at r
  rw [leftCoset_eq_iff, mul_one] at r
  

Proof state:
A B : GroupCat
f : A ⟶ B
b : ↑B
hb : b ∉ MonoidHom.range f
b' : ↑B := b
r : b'⁻¹ ∈ MonoidHom.range f
⊢ False

Next tactic:
exact hb (inv_inv b ▸ Subgroup.inv_mem _ r)
theorem τ_symm_apply_fromCoset : Equiv.symm τ (fromCoset ⟨f.range, 1, one_leftCoset _⟩) = ∞ := by
  

Proof state:
A B : GroupCat
f : A ⟶ B
⊢ τ.symm
      (fromCoset
        { val := ↑(MonoidHom.range f),
          property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = ↑(MonoidHom.range f)) }) =
    ∞

Next tactic:
rw [tau, Equiv.symm_swap, Equiv.swap_apply_left]
theorem τ_symm_apply_infinity :
    Equiv.symm τ ∞ = fromCoset ⟨f.range, 1, one_leftCoset _⟩ := by
  

Proof state:
A B : GroupCat
f : A ⟶ B
⊢ τ.symm ∞ =
    fromCoset
      { val := ↑(MonoidHom.range f),
        property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = ↑(MonoidHom.range f)) }

Next tactic:
rw [tau, Equiv.symm_swap, Equiv.swap_apply_right]
/-- Let `g : B ⟶ S(X')` be defined as such that, for any `β : B`, `g(β)` is the function sending
point at infinity to point at infinity and sending coset `y` to `β • y`.
-/
def g : B →* SX' where
  toFun β :=
    { toFun := fun x => β • x
      invFun := fun x => β⁻¹ • x
      left_inv := fun x => by
        

Proof state:
A B : GroupCat
f : A ⟶ B
β : ↑B
x : X'
⊢ (fun x => β⁻¹ • x) ((fun x => β • x) x) = x

Next tactic:
dsimp only
/-- Let `g : B ⟶ S(X')` be defined as such that, for any `β : B`, `g(β)` is the function sending
point at infinity to point at infinity and sending coset `y` to `β • y`.
-/
def g : B →* SX' where
  toFun β :=
    { toFun := fun x => β • x
      invFun := fun x => β⁻¹ • x
      left_inv := fun x => by
        dsimp only
        

Proof state:
A B : GroupCat
f : A ⟶ B
β : ↑B
x : X'
⊢ β⁻¹ • β • x = x

Next tactic:
rw [← mul_smul, mul_left_inv, one_smul]
/-- Let `g : B ⟶ S(X')` be defined as such that, for any `β : B`, `g(β)` is the function sending
point at infinity to point at infinity and sending coset `y` to `β • y`.
-/
def g : B →* SX' where
  toFun β :=
    { toFun := fun x => β • x
      invFun := fun x => β⁻¹ • x
      left_inv := fun x => by
        dsimp only
        rw [← mul_smul, mul_left_inv, one_smul]
      right_inv := fun x => by
        

Proof state:
A B : GroupCat
f : A ⟶ B
β : ↑B
x : X'
⊢ (fun x => β • x) ((fun x => β⁻¹ • x) x) = x

Next tactic:
dsimp only
/-- Let `g : B ⟶ S(X')` be defined as such that, for any `β : B`, `g(β)` is the function sending
point at infinity to point at infinity and sending coset `y` to `β • y`.
-/
def g : B →* SX' where
  toFun β :=
    { toFun := fun x => β • x
      invFun := fun x => β⁻¹ • x
      left_inv := fun x => by
        dsimp only
        rw [← mul_smul, mul_left_inv, one_smul]
      right_inv := fun x => by
        dsimp only
        

Proof state:
A B : GroupCat
f : A ⟶ B
β : ↑B
x : X'
⊢ β • β⁻¹ • x = x

Next tactic:
rw [← mul_smul, mul_right_inv, one_smul]
/-- Let `g : B ⟶ S(X')` be defined as such that, for any `β : B`, `g(β)` is the function sending
point at infinity to point at infinity and sending coset `y` to `β • y`.
-/
def g : B →* SX' where
  toFun β :=
    { toFun := fun x => β • x
      invFun := fun x => β⁻¹ • x
      left_inv := fun x => by
        dsimp only
        rw [← mul_smul, mul_left_inv, one_smul]
      right_inv := fun x => by
        dsimp only
        rw [← mul_smul, mul_right_inv, one_smul] }
  map_one' := by
    

Proof state:
A B : GroupCat
f : A ⟶ B
⊢ (fun β =>
        { toFun := fun x => β • x, invFun := fun x => β⁻¹ • x,
          left_inv := (_ : ∀ (x : X'), (fun x => β⁻¹ • x) ((fun x => β • x) x) = x),
          right_inv := (_ : ∀ (x : X'), (fun x => β • x) ((fun x => β⁻¹ • x) x) = x) })
      1 =
    1

Next tactic:
ext
/-- Let `g : B ⟶ S(X')` be defined as such that, for any `β : B`, `g(β)` is the function sending
point at infinity to point at infinity and sending coset `y` to `β • y`.
-/
def g : B →* SX' where
  toFun β :=
    { toFun := fun x => β • x
      invFun := fun x => β⁻¹ • x
      left_inv := fun x => by
        dsimp only
        rw [← mul_smul, mul_left_inv, one_smul]
      right_inv := fun x => by
        dsimp only
        rw [← mul_smul, mul_right_inv, one_smul] }
  map_one' := by
    ext
    

Proof state:
case H
A B : GroupCat
f : A ⟶ B
x✝ : X'
⊢ ((fun β =>
          { toFun := fun x => β • x, invFun := fun x => β⁻¹ • x,
            left_inv := (_ : ∀ (x : X'), (fun x => β⁻¹ • x) ((fun x => β • x) x) = x),
            right_inv := (_ : ∀ (x : X'), (fun x => β • x) ((fun x => β⁻¹ • x) x) = x) })
        1)
      x✝ =
    1 x✝

Next tactic:
simp [one_smul]
/-- Let `g : B ⟶ S(X')` be defined as such that, for any `β : B`, `g(β)` is the function sending
point at infinity to point at infinity and sending coset `y` to `β • y`.
-/
def g : B →* SX' where
  toFun β :=
    { toFun := fun x => β • x
      invFun := fun x => β⁻¹ • x
      left_inv := fun x => by
        dsimp only
        rw [← mul_smul, mul_left_inv, one_smul]
      right_inv := fun x => by
        dsimp only
        rw [← mul_smul, mul_right_inv, one_smul] }
  map_one' := by
    ext
    simp [one_smul]
  map_mul' b1 b2 := by
    

Proof state:
A B : GroupCat
f : A ⟶ B
b1 b2 : ↑B
⊢ OneHom.toFun
      {
        toFun := fun β =>
          { toFun := fun x => β • x, invFun := fun x => β⁻¹ • x,
            left_inv := (_ : ∀ (x : X'), (fun x => β⁻¹ • x) ((fun x => β • x) x) = x),
            right_inv := (_ : ∀ (x : X'), (fun x => β • x) ((fun x => β⁻¹ • x) x) = x) },
        map_one' :=
          (_ :
            (fun β =>
                  { toFun := fun x => β • x, invFun := fun x => β⁻¹ • x,
                    left_inv := (_ : ∀ (x : X'), (fun x => β⁻¹ • x) ((fun x => β • x) x) = x),
                    right_inv := (_ : ∀ (x : X'), (fun x => β • x) ((fun x => β⁻¹ • x) x) = x) })
                1 =
              1) }
      (b1 * b2) =
    OneHom.toFun
        {
          toFun := fun β =>
            { toFun := fun x => β • x, invFun := fun x => β⁻¹ • x,
              left_inv := (_ : ∀ (x : X'), (fun x => β⁻¹ • x) ((fun x => β • x) x) = x),
              right_inv := (_ : ∀ (x : X'), (fun x => β • x) ((fun x => β⁻¹ • x) x) = x) },
          map_one' :=
            (_ :
              (fun β =>
                    { toFun := fun x => β • x, invFun := fun x => β⁻¹ • x,
                      left_inv := (_ : ∀ (x : X'), (fun x => β⁻¹ • x) ((fun x => β • x) x) = x),
                      right_inv := (_ : ∀ (x : X'), (fun x => β • x) ((fun x => β⁻¹ • x) x) = x) })
                  1 =
                1) }
        b1 *
      OneHom.toFun
        {
          toFun := fun β =>
            { toFun := fun x => β • x, invFun := fun x => β⁻¹ • x,
              left_inv := (_ : ∀ (x : X'), (fun x => β⁻¹ • x) ((fun x => β • x) x) = x),
              right_inv := (_ : ∀ (x : X'), (fun x => β • x) ((fun x => β⁻¹ • x) x) = x) },
          map_one' :=
            (_ :
              (fun β =>
                    { toFun := fun x => β • x, invFun := fun x => β⁻¹ • x,
                      left_inv := (_ : ∀ (x : X'), (fun x => β⁻¹ • x) ((fun x => β • x) x) = x),
                      right_inv := (_ : ∀ (x : X'), (fun x => β • x) ((fun x => β⁻¹ • x) x) = x) })
                  1 =
                1) }
        b2

Next tactic:
ext
/-- Let `g : B ⟶ S(X')` be defined as such that, for any `β : B`, `g(β)` is the function sending
point at infinity to point at infinity and sending coset `y` to `β • y`.
-/
def g : B →* SX' where
  toFun β :=
    { toFun := fun x => β • x
      invFun := fun x => β⁻¹ • x
      left_inv := fun x => by
        dsimp only
        rw [← mul_smul, mul_left_inv, one_smul]
      right_inv := fun x => by
        dsimp only
        rw [← mul_smul, mul_right_inv, one_smul] }
  map_one' := by
    ext
    simp [one_smul]
  map_mul' b1 b2 := by
    ext
    

Proof state:
case H
A B : GroupCat
f : A ⟶ B
b1 b2 : ↑B
x✝ : X'
⊢ (OneHom.toFun
        {
          toFun := fun β =>
            { toFun := fun x => β • x, invFun := fun x => β⁻¹ • x,
              left_inv := (_ : ∀ (x : X'), (fun x => β⁻¹ • x) ((fun x => β • x) x) = x),
              right_inv := (_ : ∀ (x : X'), (fun x => β • x) ((fun x => β⁻¹ • x) x) = x) },
          map_one' :=
            (_ :
              (fun β =>
                    { toFun := fun x => β • x, invFun := fun x => β⁻¹ • x,
                      left_inv := (_ : ∀ (x : X'), (fun x => β⁻¹ • x) ((fun x => β • x) x) = x),
                      right_inv := (_ : ∀ (x : X'), (fun x => β • x) ((fun x => β⁻¹ • x) x) = x) })
                  1 =
                1) }
        (b1 * b2))
      x✝ =
    (OneHom.toFun
          {
            toFun := fun β =>
              { toFun := fun x => β • x, invFun := fun x => β⁻¹ • x,
                left_inv := (_ : ∀ (x : X'), (fun x => β⁻¹ • x) ((fun x => β • x) x) = x),
                right_inv := (_ : ∀ (x : X'), (fun x => β • x) ((fun x => β⁻¹ • x) x) = x) },
            map_one' :=
              (_ :
                (fun β =>
                      { toFun := fun x => β • x, invFun := fun x => β⁻¹ • x,
                        left_inv := (_ : ∀ (x : X'), (fun x => β⁻¹ • x) ((fun x => β • x) x) = x),
                        right_inv := (_ : ∀ (x : X'), (fun x => β • x) ((fun x => β⁻¹ • x) x) = x) })
                    1 =
                  1) }
          b1 *
        OneHom.toFun
          {
            toFun := fun β =>
              { toFun := fun x => β • x, invFun := fun x => β⁻¹ • x,
                left_inv := (_ : ∀ (x : X'), (fun x => β⁻¹ • x) ((fun x => β • x) x) = x),
                right_inv := (_ : ∀ (x : X'), (fun x => β • x) ((fun x => β⁻¹ • x) x) = x) },
            map_one' :=
              (_ :
                (fun β =>
                      { toFun := fun x => β • x, invFun := fun x => β⁻¹ • x,
                        left_inv := (_ : ∀ (x : X'), (fun x => β⁻¹ • x) ((fun x => β • x) x) = x),
                        right_inv := (_ : ∀ (x : X'), (fun x => β • x) ((fun x => β⁻¹ • x) x) = x) })
                    1 =
                  1) }
          b2)
      x✝

Next tactic:
simp [mul_smul]
/-- Define `h : B ⟶ S(X')` to be `τ g τ⁻¹`
-/
def h : B →* SX' where
  -- Porting note: mathport removed () from (τ) which are needed
  toFun β := ((τ).symm.trans (g β)).trans τ
  map_one' := by
    

Proof state:
A B : GroupCat
f : A ⟶ B
⊢ (fun β => (τ.symm.trans (g β)).trans τ) 1 = 1

Next tactic:
ext
/-- Define `h : B ⟶ S(X')` to be `τ g τ⁻¹`
-/
def h : B →* SX' where
  -- Porting note: mathport removed () from (τ) which are needed
  toFun β := ((τ).symm.trans (g β)).trans τ
  map_one' := by
    ext
    

Proof state:
case H
A B : GroupCat
f : A ⟶ B
x✝ : X'
⊢ ((fun β => (τ.symm.trans (g β)).trans τ) 1) x✝ = 1 x✝

Next tactic:
simp
/-- Define `h : B ⟶ S(X')` to be `τ g τ⁻¹`
-/
def h : B →* SX' where
  -- Porting note: mathport removed () from (τ) which are needed
  toFun β := ((τ).symm.trans (g β)).trans τ
  map_one' := by
    ext
    simp
  map_mul' b1 b2 := by
    

Proof state:
A B : GroupCat
f : A ⟶ B
b1 b2 : ↑B
⊢ OneHom.toFun
      { toFun := fun β => (τ.symm.trans (g β)).trans τ,
        map_one' := (_ : (fun β => (τ.symm.trans (g β)).trans τ) 1 = 1) }
      (b1 * b2) =
    OneHom.toFun
        { toFun := fun β => (τ.symm.trans (g β)).trans τ,
          map_one' := (_ : (fun β => (τ.symm.trans (g β)).trans τ) 1 = 1) }
        b1 *
      OneHom.toFun
        { toFun := fun β => (τ.symm.trans (g β)).trans τ,
          map_one' := (_ : (fun β => (τ.symm.trans (g β)).trans τ) 1 = 1) }
        b2

Next tactic:
ext
/-- Define `h : B ⟶ S(X')` to be `τ g τ⁻¹`
-/
def h : B →* SX' where
  -- Porting note: mathport removed () from (τ) which are needed
  toFun β := ((τ).symm.trans (g β)).trans τ
  map_one' := by
    ext
    simp
  map_mul' b1 b2 := by
    ext
    

Proof state:
case H
A B : GroupCat
f : A ⟶ B
b1 b2 : ↑B
x✝ : X'
⊢ (OneHom.toFun
        { toFun := fun β => (τ.symm.trans (g β)).trans τ,
          map_one' := (_ : (fun β => (τ.symm.trans (g β)).trans τ) 1 = 1) }
        (b1 * b2))
      x✝ =
    (OneHom.toFun
          { toFun := fun β => (τ.symm.trans (g β)).trans τ,
            map_one' := (_ : (fun β => (τ.symm.trans (g β)).trans τ) 1 = 1) }
          b1 *
        OneHom.toFun
          { toFun := fun β => (τ.symm.trans (g β)).trans τ,
            map_one' := (_ : (fun β => (τ.symm.trans (g β)).trans τ) 1 = 1) }
          b2)
      x✝

Next tactic:
simp
theorem g_apply_fromCoset (x : B) (y : Set.range (· • (f.range : Set B) : B → Set B)) :
    g x (fromCoset y) = fromCoset ⟨x • ↑y,
      by 

Proof state:
A B : GroupCat
f : A ⟶ B
x : ↑B
y : ↑(Set.range fun x => x • ↑(MonoidHom.range f))
⊢ x • ↑y ∈ Set.range fun x => x • ↑(MonoidHom.range f)

Next tactic:
obtain ⟨z, hz⟩ := y.2
theorem g_apply_fromCoset (x : B) (y : Set.range (· • (f.range : Set B) : B → Set B)) :
    g x (fromCoset y) = fromCoset ⟨x • ↑y,
      by obtain ⟨z, hz⟩ := y.2; 

Proof state:
case intro
A B : GroupCat
f : A ⟶ B
x : ↑B
y : ↑(Set.range fun x => x • ↑(MonoidHom.range f))
z : ↑B
hz : (fun x => x • ↑(MonoidHom.range f)) z = ↑y
⊢ x • ↑y ∈ Set.range fun x => x • ↑(MonoidHom.range f)

Next tactic:
exact ⟨x * z, by simp [← hz, smul_smul]⟩
theorem g_apply_fromCoset (x : B) (y : Set.range (· • (f.range : Set B) : B → Set B)) :
    g x (fromCoset y) = fromCoset ⟨x • ↑y,
      by obtain ⟨z, hz⟩ := y.2; exact ⟨x * z, by 

Proof state:
A B : GroupCat
f : A ⟶ B
x : ↑B
y : ↑(Set.range fun x => x • ↑(MonoidHom.range f))
z : ↑B
hz : (fun x => x • ↑(MonoidHom.range f)) z = ↑y
⊢ (fun x => x • ↑(MonoidHom.range f)) (x * z) = x • ↑y

Next tactic:
simp [← hz, smul_smul]
theorem h_apply_infinity (x : B) (hx : x ∈ f.range) : (h x) ∞ = ∞ := by
  

Proof state:
A B : GroupCat
f : A ⟶ B
x : ↑B
hx : x ∈ MonoidHom.range f
⊢ (h x) ∞ = ∞

Next tactic:
change ((τ).symm.trans (g x)).trans τ _ = _
theorem h_apply_infinity (x : B) (hx : x ∈ f.range) : (h x) ∞ = ∞ := by
  change ((τ).symm.trans (g x)).trans τ _ = _
  

Proof state:
A B : GroupCat
f : A ⟶ B
x : ↑B
hx : x ∈ MonoidHom.range f
⊢ ((τ.symm.trans (g x)).trans τ) ∞ = ∞

Next tactic:
simp only [MonoidHom.coe_mk, Equiv.toFun_as_coe, Equiv.coe_trans, Function.comp_apply]
theorem h_apply_infinity (x : B) (hx : x ∈ f.range) : (h x) ∞ = ∞ := by
  change ((τ).symm.trans (g x)).trans τ _ = _
  simp only [MonoidHom.coe_mk, Equiv.toFun_as_coe, Equiv.coe_trans, Function.comp_apply]
  

Proof state:
A B : GroupCat
f : A ⟶ B
x : ↑B
hx : x ∈ MonoidHom.range f
⊢ τ ((g x) (τ.symm ∞)) = ∞

Next tactic:
rw [τ_symm_apply_infinity, g_apply_fromCoset]
theorem h_apply_infinity (x : B) (hx : x ∈ f.range) : (h x) ∞ = ∞ := by
  change ((τ).symm.trans (g x)).trans τ _ = _
  simp only [MonoidHom.coe_mk, Equiv.toFun_as_coe, Equiv.coe_trans, Function.comp_apply]
  rw [τ_symm_apply_infinity, g_apply_fromCoset]
  

Proof state:
A B : GroupCat
f : A ⟶ B
x : ↑B
hx : x ∈ MonoidHom.range f
⊢ τ
      (fromCoset
        {
          val :=
            x •
              ↑{ val := ↑(MonoidHom.range f),
                  property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = ↑(MonoidHom.range f)) },
          property :=
            (_ :
              x •
                  ↑{ val := ↑(MonoidHom.range f),
                      property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = ↑(MonoidHom.range f)) } ∈
                Set.range fun x => x • ↑(MonoidHom.range f)) }) =
    ∞

Next tactic:
simpa only using τ_apply_fromCoset' f x hx
theorem h_apply_fromCoset (x : B) :
    (h x) (fromCoset ⟨f.range, 1, one_leftCoset _⟩) =
      fromCoset ⟨f.range, 1, one_leftCoset _⟩ := by
    

Proof state:
A B : GroupCat
f : A ⟶ B
x : ↑B
⊢ (h x)
      (fromCoset
        { val := ↑(MonoidHom.range f),
          property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = ↑(MonoidHom.range f)) }) =
    fromCoset
      { val := ↑(MonoidHom.range f),
        property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = ↑(MonoidHom.range f)) }

Next tactic:
change ((τ).symm.trans (g x)).trans τ _ = _
theorem h_apply_fromCoset (x : B) :
    (h x) (fromCoset ⟨f.range, 1, one_leftCoset _⟩) =
      fromCoset ⟨f.range, 1, one_leftCoset _⟩ := by
    change ((τ).symm.trans (g x)).trans τ _ = _
    

Proof state:
A B : GroupCat
f : A ⟶ B
x : ↑B
⊢ ((τ.symm.trans (g x)).trans τ)
      (fromCoset
        { val := ↑(MonoidHom.range f),
          property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = ↑(MonoidHom.range f)) }) =
    fromCoset
      { val := ↑(MonoidHom.range f),
        property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = ↑(MonoidHom.range f)) }

Next tactic:
simp [-MonoidHom.coe_range, τ_symm_apply_fromCoset, g_apply_infinity, τ_apply_infinity]
theorem h_apply_fromCoset_nin_range (x : B) (hx : x ∈ f.range) (b : B) (hb : b ∉ f.range) :
    h x (fromCoset ⟨b • f.range, b, rfl⟩) = fromCoset ⟨(x * b) • ↑f.range, x * b, rfl⟩ := by
  

Proof state:
A B : GroupCat
f : A ⟶ B
x : ↑B
hx : x ∈ MonoidHom.range f
b : ↑B
hb : b ∉ MonoidHom.range f
⊢ (h x)
      (fromCoset
        { val := b • ↑(MonoidHom.range f),
          property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = b • ↑(MonoidHom.range f)) }) =
    fromCoset
      { val := (x * b) • ↑(MonoidHom.range f),
        property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = (x * b) • ↑(MonoidHom.range f)) }

Next tactic:
change ((τ).symm.trans (g x)).trans τ _ = _
theorem h_apply_fromCoset_nin_range (x : B) (hx : x ∈ f.range) (b : B) (hb : b ∉ f.range) :
    h x (fromCoset ⟨b • f.range, b, rfl⟩) = fromCoset ⟨(x * b) • ↑f.range, x * b, rfl⟩ := by
  change ((τ).symm.trans (g x)).trans τ _ = _
  

Proof state:
A B : GroupCat
f : A ⟶ B
x : ↑B
hx : x ∈ MonoidHom.range f
b : ↑B
hb : b ∉ MonoidHom.range f
⊢ ((τ.symm.trans (g x)).trans τ)
      (fromCoset
        { val := b • ↑(MonoidHom.range f),
          property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = b • ↑(MonoidHom.range f)) }) =
    fromCoset
      { val := (x * b) • ↑(MonoidHom.range f),
        property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = (x * b) • ↑(MonoidHom.range f)) }

Next tactic:
simp only [tau, MonoidHom.coe_mk, Equiv.toFun_as_coe, Equiv.coe_trans, Function.comp_apply]
theorem h_apply_fromCoset_nin_range (x : B) (hx : x ∈ f.range) (b : B) (hb : b ∉ f.range) :
    h x (fromCoset ⟨b • f.range, b, rfl⟩) = fromCoset ⟨(x * b) • ↑f.range, x * b, rfl⟩ := by
  change ((τ).symm.trans (g x)).trans τ _ = _
  simp only [tau, MonoidHom.coe_mk, Equiv.toFun_as_coe, Equiv.coe_trans, Function.comp_apply]
  

Proof state:
A B : GroupCat
f : A ⟶ B
x : ↑B
hx : x ∈ MonoidHom.range f
b : ↑B
hb : b ∉ MonoidHom.range f
⊢ (Equiv.swap
        (fromCoset
          { val := ↑(MonoidHom.range f),
            property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = ↑(MonoidHom.range f)) })
        ∞)
      ((g x)
        ((Equiv.swap
              (fromCoset
                { val := ↑(MonoidHom.range f),
                  property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = ↑(MonoidHom.range f)) })
              ∞).symm
          (fromCoset
            { val := b • ↑(MonoidHom.range f),
              property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = b • ↑(MonoidHom.range f)) }))) =
    fromCoset
      { val := (x * b) • ↑(MonoidHom.range f),
        property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = (x * b) • ↑(MonoidHom.range f)) }

Next tactic:
rw [Equiv.symm_swap,
    @Equiv.swap_apply_of_ne_of_ne X' _ (fromCoset ⟨f.range, 1, one_leftCoset _⟩) ∞
      (fromCoset ⟨b • ↑f.range, b, rfl⟩) (fromCoset_ne_of_nin_range _ hb) (by simp)]
theorem h_apply_fromCoset_nin_range (x : B) (hx : x ∈ f.range) (b : B) (hb : b ∉ f.range) :
    h x (fromCoset ⟨b • f.range, b, rfl⟩) = fromCoset ⟨(x * b) • ↑f.range, x * b, rfl⟩ := by
  change ((τ).symm.trans (g x)).trans τ _ = _
  simp only [tau, MonoidHom.coe_mk, Equiv.toFun_as_coe, Equiv.coe_trans, Function.comp_apply]
  rw [Equiv.symm_swap,
    @Equiv.swap_apply_of_ne_of_ne X' _ (fromCoset ⟨f.range, 1, one_leftCoset _⟩) ∞
      (fromCoset ⟨b • ↑f.range, b, rfl⟩) (fromCoset_ne_of_nin_range _ hb) (by 

Proof state:
A B : GroupCat
f : A ⟶ B
x : ↑B
hx : x ∈ MonoidHom.range f
b : ↑B
hb : b ∉ MonoidHom.range f
⊢ fromCoset
      { val := b • ↑(MonoidHom.range f),
        property := (_ : ∃ y, (fun x => x • ↑(MonoidHom.range f)) y = b • ↑(MonoidHom.range f)) } ≠
    ∞

Next tactic:
simp