l3lab/ntp-mathlib huggingface dataset:
theorem smul_Iio : r • Iio a = Iio (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Iio]
  constructor
  · rintro ⟨a_w, a_h_left, rfl⟩
    exact (mul_lt_mul_left hr).mpr a_h_left
  · rintro h
    use x / r
    

Proof state:
case h
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
h : x < r * a
⊢ x / r < a ∧ r * (x / r) = x

Next tactic:
constructor
theorem smul_Iio : r • Iio a = Iio (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Iio]
  constructor
  · rintro ⟨a_w, a_h_left, rfl⟩
    exact (mul_lt_mul_left hr).mpr a_h_left
  · rintro h
    use x / r
    constructor
    

Proof state:
case h.left
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
h : x < r * a
⊢ x / r < a
case h.right
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
h : x < r * a
⊢ r * (x / r) = x

Next tactic:
exact (div_lt_iff' hr).mpr h
theorem smul_Iio : r • Iio a = Iio (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Iio]
  constructor
  · rintro ⟨a_w, a_h_left, rfl⟩
    exact (mul_lt_mul_left hr).mpr a_h_left
  · rintro h
    use x / r
    constructor
    exact (div_lt_iff' hr).mpr h
    

Proof state:
case h.right
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
h : x < r * a
⊢ r * (x / r) = x

Next tactic:
exact mul_div_cancel' _ (ne_of_gt hr)
theorem smul_Ici : r • Ici a = Ici (r • a) := by
  

Proof state:
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
⊢ r • Ici a = Ici (r • a)

Next tactic:
ext x
theorem smul_Ici : r • Ici a = Ici (r • a) := by
  ext x
  

Proof state:
case h
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ x ∈ r • Ici a ↔ x ∈ Ici (r • a)

Next tactic:
simp only [mem_smul_set, smul_eq_mul, mem_Ioi]
theorem smul_Ici : r • Ici a = Ici (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Ioi]
  

Proof state:
case h
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ (∃ y ∈ Ici a, r * y = x) ↔ x ∈ Ici (r * a)

Next tactic:
constructor
theorem smul_Ici : r • Ici a = Ici (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Ioi]
  constructor
  · 

Proof state:
case h.mp
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ (∃ y ∈ Ici a, r * y = x) → x ∈ Ici (r * a)

Next tactic:
rintro ⟨a_w, a_h_left, rfl⟩
theorem smul_Ici : r • Ici a = Ici (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Ioi]
  constructor
  · rintro ⟨a_w, a_h_left, rfl⟩
    

Proof state:
case h.mp.intro.intro
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
a_w : K
a_h_left : a_w ∈ Ici a
⊢ r * a_w ∈ Ici (r * a)

Next tactic:
exact (mul_le_mul_left hr).mpr a_h_left
theorem smul_Ici : r • Ici a = Ici (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Ioi]
  constructor
  · rintro ⟨a_w, a_h_left, rfl⟩
    exact (mul_le_mul_left hr).mpr a_h_left
  · 

Proof state:
case h.mpr
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ x ∈ Ici (r * a) → ∃ y ∈ Ici a, r * y = x

Next tactic:
rintro h
theorem smul_Ici : r • Ici a = Ici (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Ioi]
  constructor
  · rintro ⟨a_w, a_h_left, rfl⟩
    exact (mul_le_mul_left hr).mpr a_h_left
  · rintro h
    

Proof state:
case h.mpr
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
h : x ∈ Ici (r * a)
⊢ ∃ y ∈ Ici a, r * y = x

Next tactic:
use x / r
theorem smul_Ici : r • Ici a = Ici (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Ioi]
  constructor
  · rintro ⟨a_w, a_h_left, rfl⟩
    exact (mul_le_mul_left hr).mpr a_h_left
  · rintro h
    use x / r
    

Proof state:
case h
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
h : x ∈ Ici (r * a)
⊢ x / r ∈ Ici a ∧ r * (x / r) = x

Next tactic:
constructor
theorem smul_Ici : r • Ici a = Ici (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Ioi]
  constructor
  · rintro ⟨a_w, a_h_left, rfl⟩
    exact (mul_le_mul_left hr).mpr a_h_left
  · rintro h
    use x / r
    constructor
    

Proof state:
case h.left
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
h : x ∈ Ici (r * a)
⊢ x / r ∈ Ici a
case h.right
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
h : x ∈ Ici (r * a)
⊢ r * (x / r) = x

Next tactic:
exact (le_div_iff' hr).mpr h
theorem smul_Ici : r • Ici a = Ici (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Ioi]
  constructor
  · rintro ⟨a_w, a_h_left, rfl⟩
    exact (mul_le_mul_left hr).mpr a_h_left
  · rintro h
    use x / r
    constructor
    exact (le_div_iff' hr).mpr h
    

Proof state:
case h.right
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
h : x ∈ Ici (r * a)
⊢ r * (x / r) = x

Next tactic:
exact mul_div_cancel' _ (ne_of_gt hr)
theorem smul_Iic : r • Iic a = Iic (r • a) := by
  

Proof state:
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
⊢ r • Iic a = Iic (r • a)

Next tactic:
ext x
theorem smul_Iic : r • Iic a = Iic (r • a) := by
  ext x
  

Proof state:
case h
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ x ∈ r • Iic a ↔ x ∈ Iic (r • a)

Next tactic:
simp only [mem_smul_set, smul_eq_mul, mem_Iio]
theorem smul_Iic : r • Iic a = Iic (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Iio]
  

Proof state:
case h
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ (∃ y ∈ Iic a, r * y = x) ↔ x ∈ Iic (r * a)

Next tactic:
constructor
theorem smul_Iic : r • Iic a = Iic (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Iio]
  constructor
  · 

Proof state:
case h.mp
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ (∃ y ∈ Iic a, r * y = x) → x ∈ Iic (r * a)

Next tactic:
rintro ⟨a_w, a_h_left, rfl⟩
theorem smul_Iic : r • Iic a = Iic (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Iio]
  constructor
  · rintro ⟨a_w, a_h_left, rfl⟩
    

Proof state:
case h.mp.intro.intro
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
a_w : K
a_h_left : a_w ∈ Iic a
⊢ r * a_w ∈ Iic (r * a)

Next tactic:
exact (mul_le_mul_left hr).mpr a_h_left
theorem smul_Iic : r • Iic a = Iic (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Iio]
  constructor
  · rintro ⟨a_w, a_h_left, rfl⟩
    exact (mul_le_mul_left hr).mpr a_h_left
  · 

Proof state:
case h.mpr
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ x ∈ Iic (r * a) → ∃ y ∈ Iic a, r * y = x

Next tactic:
rintro h
theorem smul_Iic : r • Iic a = Iic (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Iio]
  constructor
  · rintro ⟨a_w, a_h_left, rfl⟩
    exact (mul_le_mul_left hr).mpr a_h_left
  · rintro h
    

Proof state:
case h.mpr
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
h : x ∈ Iic (r * a)
⊢ ∃ y ∈ Iic a, r * y = x

Next tactic:
use x / r
theorem smul_Iic : r • Iic a = Iic (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Iio]
  constructor
  · rintro ⟨a_w, a_h_left, rfl⟩
    exact (mul_le_mul_left hr).mpr a_h_left
  · rintro h
    use x / r
    

Proof state:
case h
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
h : x ∈ Iic (r * a)
⊢ x / r ∈ Iic a ∧ r * (x / r) = x

Next tactic:
constructor
theorem smul_Iic : r • Iic a = Iic (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Iio]
  constructor
  · rintro ⟨a_w, a_h_left, rfl⟩
    exact (mul_le_mul_left hr).mpr a_h_left
  · rintro h
    use x / r
    constructor
    

Proof state:
case h.left
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
h : x ∈ Iic (r * a)
⊢ x / r ∈ Iic a
case h.right
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
h : x ∈ Iic (r * a)
⊢ r * (x / r) = x

Next tactic:
exact (div_le_iff' hr).mpr h
theorem smul_Iic : r • Iic a = Iic (r • a) := by
  ext x
  simp only [mem_smul_set, smul_eq_mul, mem_Iio]
  constructor
  · rintro ⟨a_w, a_h_left, rfl⟩
    exact (mul_le_mul_left hr).mpr a_h_left
  · rintro h
    use x / r
    constructor
    exact (div_le_iff' hr).mpr h
    

Proof state:
case h.right
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
h : x ∈ Iic (r * a)
⊢ r * (x / r) = x

Next tactic:
exact mul_div_cancel' _ (ne_of_gt hr)
@[norm_cast]
theorem coe_nat_dvd {m n : ℕ} : (↑m : ℤ) ∣ ↑n ↔ m ∣ n :=
  ⟨fun ⟨a, ae⟩ =>
    m.eq_zero_or_pos.elim (fun m0 => by 

Proof state:
m n : ℕ
x✝ : ↑m ∣ ↑n
a : ℤ
ae : ↑n = ↑m * a
m0 : m = 0
⊢ m ∣ n

Next tactic:
simp [m0] at ae
@[norm_cast]
theorem coe_nat_dvd {m n : ℕ} : (↑m : ℤ) ∣ ↑n ↔ m ∣ n :=
  ⟨fun ⟨a, ae⟩ =>
    m.eq_zero_or_pos.elim (fun m0 => by simp [m0] at ae; 

Proof state:
m n : ℕ
x✝ : ↑m ∣ ↑n
a : ℤ
m0 : m = 0
ae : n = 0
⊢ m ∣ n

Next tactic:
simp [ae, m0]
@[norm_cast]
theorem coe_nat_dvd {m n : ℕ} : (↑m : ℤ) ∣ ↑n ↔ m ∣ n :=
  ⟨fun ⟨a, ae⟩ =>
    m.eq_zero_or_pos.elim (fun m0 => by simp [m0] at ae; simp [ae, m0]) fun m0l => by
      

Proof state:
m n : ℕ
x✝ : ↑m ∣ ↑n
a : ℤ
ae : ↑n = ↑m * a
m0l : m > 0
⊢ m ∣ n

Next tactic:
cases'
        eq_ofNat_of_zero_le
          (@nonneg_of_mul_nonneg_right ℤ _ m a (by simp [ae.symm]) (by simpa using m0l)) with
        k e
@[norm_cast]
theorem coe_nat_dvd {m n : ℕ} : (↑m : ℤ) ∣ ↑n ↔ m ∣ n :=
  ⟨fun ⟨a, ae⟩ =>
    m.eq_zero_or_pos.elim (fun m0 => by simp [m0] at ae; simp [ae, m0]) fun m0l => by
      cases'
        eq_ofNat_of_zero_le
          (@nonneg_of_mul_nonneg_right ℤ _ m a (by 

Proof state:
m n : ℕ
x✝ : ↑m ∣ ↑n
a : ℤ
ae : ↑n = ↑m * a
m0l : m > 0
⊢ 0 ≤ ↑m * a

Next tactic:
simp [ae.symm]
@[norm_cast]
theorem coe_nat_dvd {m n : ℕ} : (↑m : ℤ) ∣ ↑n ↔ m ∣ n :=
  ⟨fun ⟨a, ae⟩ =>
    m.eq_zero_or_pos.elim (fun m0 => by simp [m0] at ae; simp [ae, m0]) fun m0l => by
      cases'
        eq_ofNat_of_zero_le
          (@nonneg_of_mul_nonneg_right ℤ _ m a (by simp [ae.symm]) (by 

Proof state:
m n : ℕ
x✝ : ↑m ∣ ↑n
a : ℤ
ae : ↑n = ↑m * a
m0l : m > 0
⊢ 0 < ↑m

Next tactic:
simpa using m0l
@[norm_cast]
theorem coe_nat_dvd {m n : ℕ} : (↑m : ℤ) ∣ ↑n ↔ m ∣ n :=
  ⟨fun ⟨a, ae⟩ =>
    m.eq_zero_or_pos.elim (fun m0 => by simp [m0] at ae; simp [ae, m0]) fun m0l => by
      cases'
        eq_ofNat_of_zero_le
          (@nonneg_of_mul_nonneg_right ℤ _ m a (by simp [ae.symm]) (by simpa using m0l)) with
        k e
      

Proof state:
case intro
m n : ℕ
x✝ : ↑m ∣ ↑n
a : ℤ
ae : ↑n = ↑m * a
m0l : m > 0
k : ℕ
e : a = ↑k
⊢ m ∣ n

Next tactic:
subst a
@[norm_cast]
theorem coe_nat_dvd {m n : ℕ} : (↑m : ℤ) ∣ ↑n ↔ m ∣ n :=
  ⟨fun ⟨a, ae⟩ =>
    m.eq_zero_or_pos.elim (fun m0 => by simp [m0] at ae; simp [ae, m0]) fun m0l => by
      cases'
        eq_ofNat_of_zero_le
          (@nonneg_of_mul_nonneg_right ℤ _ m a (by simp [ae.symm]) (by simpa using m0l)) with
        k e
      subst a
      

Proof state:
case intro
m n : ℕ
x✝ : ↑m ∣ ↑n
m0l : m > 0
k : ℕ
ae : ↑n = ↑m * ↑k
⊢ m ∣ n

Next tactic:
exact ⟨k, Int.ofNat.inj ae⟩
@[norm_cast]
theorem coe_nat_dvd {m n : ℕ} : (↑m : ℤ) ∣ ↑n ↔ m ∣ n :=
  ⟨fun ⟨a, ae⟩ =>
    m.eq_zero_or_pos.elim (fun m0 => by simp [m0] at ae; simp [ae, m0]) fun m0l => by
      cases'
        eq_ofNat_of_zero_le
          (@nonneg_of_mul_nonneg_right ℤ _ m a (by simp [ae.symm]) (by simpa using m0l)) with
        k e
      subst a
      exact ⟨k, Int.ofNat.inj ae⟩,
    fun ⟨k, e⟩ => Dvd.intro k <| by 

Proof state:
m n : ℕ
x✝ : m ∣ n
k : ℕ
e : n = m * k
⊢ ↑m * ↑k = ↑n

Next tactic:
rw [e, Int.ofNat_mul]
theorem coe_nat_dvd_left {n : ℕ} {z : ℤ} : (↑n : ℤ) ∣ z ↔ n ∣ z.natAbs := by
  

Proof state:
n : ℕ
z : ℤ
⊢ ↑n ∣ z ↔ n ∣ natAbs z

Next tactic:
rcases natAbs_eq z with (eq | eq)
theorem coe_nat_dvd_left {n : ℕ} {z : ℤ} : (↑n : ℤ) ∣ z ↔ n ∣ z.natAbs := by
  rcases natAbs_eq z with (eq | eq) <;> 

Proof state:
case inl
n : ℕ
z : ℤ
eq : z = ↑(natAbs z)
⊢ ↑n ∣ z ↔ n ∣ natAbs z

Next tactic:
rw [eq]
theorem coe_nat_dvd_left {n : ℕ} {z : ℤ} : (↑n : ℤ) ∣ z ↔ n ∣ z.natAbs := by
  rcases natAbs_eq z with (eq | eq) <;> 

Proof state:
case inr
n : ℕ
z : ℤ
eq : z = -↑(natAbs z)
⊢ ↑n ∣ z ↔ n ∣ natAbs z

Next tactic:
rw [eq]
theorem coe_nat_dvd_left {n : ℕ} {z : ℤ} : (↑n : ℤ) ∣ z ↔ n ∣ z.natAbs := by
  rcases natAbs_eq z with (eq | eq) <;> rw [eq] <;> 

Proof state:
case inl
n : ℕ
z : ℤ
eq : z = ↑(natAbs z)
⊢ ↑n ∣ ↑(natAbs z) ↔ n ∣ natAbs ↑(natAbs z)

Next tactic:
simp [← coe_nat_dvd]
theorem coe_nat_dvd_left {n : ℕ} {z : ℤ} : (↑n : ℤ) ∣ z ↔ n ∣ z.natAbs := by
  rcases natAbs_eq z with (eq | eq) <;> rw [eq] <;> 

Proof state:
case inr
n : ℕ
z : ℤ
eq : z = -↑(natAbs z)
⊢ ↑n ∣ -↑(natAbs z) ↔ n ∣ natAbs (-↑(natAbs z))

Next tactic:
simp [← coe_nat_dvd]
theorem coe_nat_dvd_right {n : ℕ} {z : ℤ} : z ∣ (↑n : ℤ) ↔ z.natAbs ∣ n := by
  

Proof state:
n : ℕ
z : ℤ
⊢ z ∣ ↑n ↔ natAbs z ∣ n

Next tactic:
rcases natAbs_eq z with (eq | eq)
theorem coe_nat_dvd_right {n : ℕ} {z : ℤ} : z ∣ (↑n : ℤ) ↔ z.natAbs ∣ n := by
  rcases natAbs_eq z with (eq | eq) <;> 

Proof state:
case inl
n : ℕ
z : ℤ
eq : z = ↑(natAbs z)
⊢ z ∣ ↑n ↔ natAbs z ∣ n

Next tactic:
rw [eq]
theorem coe_nat_dvd_right {n : ℕ} {z : ℤ} : z ∣ (↑n : ℤ) ↔ z.natAbs ∣ n := by
  rcases natAbs_eq z with (eq | eq) <;> 

Proof state:
case inr
n : ℕ
z : ℤ
eq : z = -↑(natAbs z)
⊢ z ∣ ↑n ↔ natAbs z ∣ n

Next tactic:
rw [eq]
theorem coe_nat_dvd_right {n : ℕ} {z : ℤ} : z ∣ (↑n : ℤ) ↔ z.natAbs ∣ n := by
  rcases natAbs_eq z with (eq | eq) <;> rw [eq] <;> 

Proof state:
case inl
n : ℕ
z : ℤ
eq : z = ↑(natAbs z)
⊢ ↑(natAbs z) ∣ ↑n ↔ natAbs ↑(natAbs z) ∣ n

Next tactic:
simp [← coe_nat_dvd]
theorem coe_nat_dvd_right {n : ℕ} {z : ℤ} : z ∣ (↑n : ℤ) ↔ z.natAbs ∣ n := by
  rcases natAbs_eq z with (eq | eq) <;> rw [eq] <;> 

Proof state:
case inr
n : ℕ
z : ℤ
eq : z = -↑(natAbs z)
⊢ -↑(natAbs z) ∣ ↑n ↔ natAbs (-↑(natAbs z)) ∣ n

Next tactic:
simp [← coe_nat_dvd]
/-- A real differentiable map `f` is conformal at point `x` if and only if its
    differential `fderiv ℝ f x` at that point scales every inner product by a positive scalar. -/
theorem conformalAt_iff' {f : E → F} {x : E} :
    ConformalAt f x ↔ ∃ c : ℝ, 0 < c ∧ ∀ u v : E, ⟪fderiv ℝ f x u, fderiv ℝ f x v⟫ = c * ⟪u, v⟫ :=
  by 

Proof state:
E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace ℝ E
inst✝ : InnerProductSpace ℝ F
f : E → F
x : E
⊢ ConformalAt f x ↔ ∃ c, 0 < c ∧ ∀ (u v : E), inner ((fderiv ℝ f x) u) ((fderiv ℝ f x) v) = c * inner u v

Next tactic:
rw [conformalAt_iff_isConformalMap_fderiv, isConformalMap_iff]
/-- A real differentiable map `f` is conformal at point `x` if and only if its
    differential `f'` at that point scales every inner product by a positive scalar. -/
theorem conformalAt_iff {f : E → F} {x : E} {f' : E →L[ℝ] F} (h : HasFDerivAt f f' x) :
    ConformalAt f x ↔ ∃ c : ℝ, 0 < c ∧ ∀ u v : E, ⟪f' u, f' v⟫ = c * ⟪u, v⟫ := by
  

Proof state:
E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace ℝ E
inst✝ : InnerProductSpace ℝ F
f : E → F
x : E
f' : E →L[ℝ] F
h : HasFDerivAt f f' x
⊢ ConformalAt f x ↔ ∃ c, 0 < c ∧ ∀ (u v : E), inner (f' u) (f' v) = c * inner u v

Next tactic:
simp only [conformalAt_iff', h.fderiv]
@[to_additive (attr := ext 1100)]
theorem hom_ext {β : Type v} [Mul β] {f g : FreeMagma α →ₙ* β} (h : f ∘ of = g ∘ of) : f = g :=
  (FunLike.ext _ _) fun x ↦ recOnMul x (congr_fun h) <| by 

Proof state:
α : Type u
β : Type v
inst✝ : Mul β
f g : FreeMagma α →ₙ* β
h : ⇑f ∘ of = ⇑g ∘ of
x : FreeMagma α
⊢ ∀ (x y : FreeMagma α), f x = g x → f y = g y → f (x * y) = g (x * y)

Next tactic:
intros
@[to_additive (attr := ext 1100)]
theorem hom_ext {β : Type v} [Mul β] {f g : FreeMagma α →ₙ* β} (h : f ∘ of = g ∘ of) : f = g :=
  (FunLike.ext _ _) fun x ↦ recOnMul x (congr_fun h) <| by intros; 

Proof state:
α : Type u
β : Type v
inst✝ : Mul β
f g : FreeMagma α →ₙ* β
h : ⇑f ∘ of = ⇑g ∘ of
x x✝ y✝ : FreeMagma α
a✝¹ : f x✝ = g x✝
a✝ : f y✝ = g y✝
⊢ f (x✝ * y✝) = g (x✝ * y✝)

Next tactic:
simp only [map_mul, *]
/-- The universal property of the free magma expressing its adjointness. -/
@[to_additive (attr := simps symm_apply)
"The universal property of the free additive magma expressing its adjointness."]
def lift : (α → β) ≃ (FreeMagma α →ₙ* β) where
  toFun f :=
  { toFun := liftAux f
    map_mul' := fun x y ↦ rfl }
  invFun F := F ∘ of
  left_inv f := rfl
  right_inv F := by 

Proof state:
α : Type u
β : Type v
inst✝ : Mul β
f : α → β
F : FreeMagma α →ₙ* β
⊢ (fun f => { toFun := liftAux f, map_mul' := (_ : ∀ (x y : FreeMagma α), liftAux f (x * y) = liftAux f (x * y)) })
      ((fun F => ⇑F ∘ of) F) =
    F

Next tactic:
ext
/-- The universal property of the free magma expressing its adjointness. -/
@[to_additive (attr := simps symm_apply)
"The universal property of the free additive magma expressing its adjointness."]
def lift : (α → β) ≃ (FreeMagma α →ₙ* β) where
  toFun f :=
  { toFun := liftAux f
    map_mul' := fun x y ↦ rfl }
  invFun F := F ∘ of
  left_inv f := rfl
  right_inv F := by ext; 

Proof state:
case h.h
α : Type u
β : Type v
inst✝ : Mul β
f : α → β
F : FreeMagma α →ₙ* β
x✝ : α
⊢ (⇑((fun f => { toFun := liftAux f, map_mul' := (_ : ∀ (x y : FreeMagma α), liftAux f (x * y) = liftAux f (x * y)) })
            ((fun F => ⇑F ∘ of) F)) ∘
        of)
      x✝ =
    (⇑F ∘ of) x✝

Next tactic:
rfl
@[to_additive]
instance instLawfulMonad : LawfulMonad FreeMagma.{u} := LawfulMonad.mk'
  (pure_bind := fun f x ↦ rfl)
  (bind_assoc := fun x f g ↦ FreeMagma.recOnPure x (fun x ↦ rfl) fun x y ih1 ih2 ↦ by
    rw [mul_bind, mul_bind, mul_bind, ih1, ih2])
  (id_map := fun x ↦ FreeMagma.recOnPure x (fun _ ↦ rfl) fun x y ih1 ih2 ↦ by
    

Proof state:
α β α✝ : Type u
x✝ x y : FreeMagma α✝
ih1 : id <$> x = x
ih2 : id <$> y = y
⊢ id <$> (x * y) = x * y

Next tactic:
rw [map_mul', ih1, ih2]
@[to_additive]
instance instLawfulMonad : LawfulMonad FreeMagma.{u} := LawfulMonad.mk'
  (pure_bind := fun f x ↦ rfl)
  (bind_assoc := fun x f g ↦ FreeMagma.recOnPure x (fun x ↦ rfl) fun x y ih1 ih2 ↦ by
    

Proof state:
α β α✝ β✝ γ✝ : Type u
x✝ : FreeMagma α✝
f : α✝ → FreeMagma β✝
g : β✝ → FreeMagma γ✝
x y : FreeMagma α✝
ih1 : x >>= f >>= g = x >>= fun x => f x >>= g
ih2 : y >>= f >>= g = y >>= fun x => f x >>= g
⊢ x * y >>= f >>= g = x * y >>= fun x => f x >>= g

Next tactic:
rw [mul_bind, mul_bind, mul_bind, ih1, ih2]
@[to_additive]
instance : LawfulTraversable FreeMagma.{u} :=
  { instLawfulMonad with
    id_traverse := fun x ↦
      FreeMagma.recOnPure x (fun x ↦ rfl) fun x y ih1 ih2 ↦ by
        

Proof state:
α β : Type u
m : Type u → Type u
inst✝ : Applicative m
F : α → m β
src✝ : LawfulMonad FreeMagma := instLawfulMonad
α✝ : Type u
x✝ x y : FreeMagma α✝
ih1 : traverse pure x = x
ih2 : traverse pure y = y
⊢ traverse pure (x * y) = x * y

Next tactic:
rw [traverse_mul, ih1, ih2, mul_map_seq]
@[to_additive]
instance : LawfulTraversable FreeMagma.{u} :=
  { instLawfulMonad with
    id_traverse := fun x ↦
      FreeMagma.recOnPure x (fun x ↦ rfl) fun x y ih1 ih2 ↦ by
        rw [traverse_mul, ih1, ih2, mul_map_seq]
    comp_traverse := fun f g x ↦
      FreeMagma.recOnPure x
        (fun x ↦ by 

Proof state:
α β : Type u
m : Type u → Type u
inst✝⁴ : Applicative m
F : α → m β
src✝ : LawfulMonad FreeMagma := instLawfulMonad
F✝ G✝ : Type u → Type u
inst✝³ : Applicative F✝
inst✝² : Applicative G✝
inst✝¹ : LawfulApplicative F✝
inst✝ : LawfulApplicative G✝
α✝ β✝ γ✝ : Type u
f : β✝ → F✝ γ✝
g : α✝ → G✝ β✝
x✝ : FreeMagma α✝
x : α✝
⊢ traverse (Functor.Comp.mk ∘ Functor.map f ∘ g) (pure x) = Functor.Comp.mk (traverse f <$> traverse g (pure x))

Next tactic:
simp only [(· ∘ ·), traverse_pure, traverse_pure', functor_norm]
@[to_additive]
instance : LawfulTraversable FreeMagma.{u} :=
  { instLawfulMonad with
    id_traverse := fun x ↦
      FreeMagma.recOnPure x (fun x ↦ rfl) fun x y ih1 ih2 ↦ by
        rw [traverse_mul, ih1, ih2, mul_map_seq]
    comp_traverse := fun f g x ↦
      FreeMagma.recOnPure x
        (fun x ↦ by simp only [(· ∘ ·), traverse_pure, traverse_pure', functor_norm])
        (fun x y ih1 ih2 ↦ by
          

Proof state:
α β : Type u
m : Type u → Type u
inst✝⁴ : Applicative m
F : α → m β
src✝ : LawfulMonad FreeMagma := instLawfulMonad
F✝ G✝ : Type u → Type u
inst✝³ : Applicative F✝
inst✝² : Applicative G✝
inst✝¹ : LawfulApplicative F✝
inst✝ : LawfulApplicative G✝
α✝ β✝ γ✝ : Type u
f : β✝ → F✝ γ✝
g : α✝ → G✝ β✝
x✝ x y : FreeMagma α✝
ih1 : traverse (Functor.Comp.mk ∘ Functor.map f ∘ g) x = Functor.Comp.mk (traverse f <$> traverse g x)
ih2 : traverse (Functor.Comp.mk ∘ Functor.map f ∘ g) y = Functor.Comp.mk (traverse f <$> traverse g y)
⊢ traverse (Functor.Comp.mk ∘ Functor.map f ∘ g) (x * y) = Functor.Comp.mk (traverse f <$> traverse g (x * y))

Next tactic:
rw [traverse_mul, ih1, ih2, traverse_mul]
@[to_additive]
instance : LawfulTraversable FreeMagma.{u} :=
  { instLawfulMonad with
    id_traverse := fun x ↦
      FreeMagma.recOnPure x (fun x ↦ rfl) fun x y ih1 ih2 ↦ by
        rw [traverse_mul, ih1, ih2, mul_map_seq]
    comp_traverse := fun f g x ↦
      FreeMagma.recOnPure x
        (fun x ↦ by simp only [(· ∘ ·), traverse_pure, traverse_pure', functor_norm])
        (fun x y ih1 ih2 ↦ by
          rw [traverse_mul, ih1, ih2, traverse_mul];
          

Proof state:
α β : Type u
m : Type u → Type u
inst✝⁴ : Applicative m
F : α → m β
src✝ : LawfulMonad FreeMagma := instLawfulMonad
F✝ G✝ : Type u → Type u
inst✝³ : Applicative F✝
inst✝² : Applicative G✝
inst✝¹ : LawfulApplicative F✝
inst✝ : LawfulApplicative G✝
α✝ β✝ γ✝ : Type u
f : β✝ → F✝ γ✝
g : α✝ → G✝ β✝
x✝ x y : FreeMagma α✝
ih1 : traverse (Functor.Comp.mk ∘ Functor.map f ∘ g) x = Functor.Comp.mk (traverse f <$> traverse g x)
ih2 : traverse (Functor.Comp.mk ∘ Functor.map f ∘ g) y = Functor.Comp.mk (traverse f <$> traverse g y)
⊢ (Seq.seq ((fun x x_1 => x * x_1) <$> Functor.Comp.mk (traverse f <$> traverse g x)) fun x =>
      Functor.Comp.mk (traverse f <$> traverse g y)) =
    Functor.Comp.mk (traverse f <$> Seq.seq ((fun x x_1 => x * x_1) <$> traverse g x) fun x => traverse g y)

Next tactic:
simp [Functor.Comp.map_mk, Functor.map_map, (· ∘ ·), Comp.seq_mk, seq_map_assoc,
            map_seq, traverse_mul]
@[to_additive]
instance : LawfulTraversable FreeMagma.{u} :=
  { instLawfulMonad with
    id_traverse := fun x ↦
      FreeMagma.recOnPure x (fun x ↦ rfl) fun x y ih1 ih2 ↦ by
        rw [traverse_mul, ih1, ih2, mul_map_seq]
    comp_traverse := fun f g x ↦
      FreeMagma.recOnPure x
        (fun x ↦ by simp only [(· ∘ ·), traverse_pure, traverse_pure', functor_norm])
        (fun x y ih1 ih2 ↦ by
          rw [traverse_mul, ih1, ih2, traverse_mul];
          simp [Functor.Comp.map_mk, Functor.map_map, (· ∘ ·), Comp.seq_mk, seq_map_assoc,
            map_seq, traverse_mul])
    naturality := fun η α β f x ↦
      FreeMagma.recOnPure x
        (fun x ↦ by simp only [traverse_pure, functor_norm, Function.comp_apply])
        (fun x y ih1 ih2 ↦ by simp only [traverse_mul, functor_norm, ih1, ih2])
    traverse_eq_map_id := fun f x ↦
      FreeMagma.recOnPure x (fun _ ↦ rfl) fun x y ih1 ih2 ↦ by
        

Proof state:
α β : Type u
m : Type u → Type u
inst✝ : Applicative m
F : α → m β
src✝ : LawfulMonad FreeMagma := instLawfulMonad
α✝ β✝ : Type u
f : α✝ → β✝
x✝ x y : FreeMagma α✝
ih1 : traverse (pure ∘ f) x = id.mk (f <$> x)
ih2 : traverse (pure ∘ f) y = id.mk (f <$> y)
⊢ traverse (pure ∘ f) (x * y) = id.mk (f <$> (x * y))

Next tactic:
rw [traverse_mul, ih1, ih2, map_mul', mul_map_seq]