l3lab/ntp-mathlib huggingface dataset:
instance : Add (M →ₗ⁅R,L⁆ N) where
  add f g := { (f : M →ₗ[R] N) + (g : M →ₗ[R] N) with map_lie' := by 

Proof state:
R : Type u
L : Type v
M : Type w
N : Type w₁
P : Type w₂
inst✝¹⁴ : CommRing R
inst✝¹³ : LieRing L
inst✝¹² : LieAlgebra R L
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieRingModule L N
inst✝³ : LieRingModule L P
inst✝² : LieModule R L M
inst✝¹ : LieModule R L N
inst✝ : LieModule R L P
f g : M →ₗ⁅R,L⁆ N
src✝ : M →ₗ[R] N := ↑f + ↑g
⊢ ∀ {x : L} {m : M},
    AddHom.toFun
        { toAddHom := src✝.toAddHom,
            map_smul' :=
              (_ :
                ∀ (r : R) (x : M),
                  AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
        ⁅x, m⁆ =
      ⁅x,
        AddHom.toFun
          { toAddHom := src✝.toAddHom,
              map_smul' :=
                (_ :
                  ∀ (r : R) (x : M),
                    AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
          m⁆

Next tactic:
simp
instance : Sub (M →ₗ⁅R,L⁆ N) where
  sub f g := { (f : M →ₗ[R] N) - (g : M →ₗ[R] N) with map_lie' := by 

Proof state:
R : Type u
L : Type v
M : Type w
N : Type w₁
P : Type w₂
inst✝¹⁴ : CommRing R
inst✝¹³ : LieRing L
inst✝¹² : LieAlgebra R L
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieRingModule L N
inst✝³ : LieRingModule L P
inst✝² : LieModule R L M
inst✝¹ : LieModule R L N
inst✝ : LieModule R L P
f g : M →ₗ⁅R,L⁆ N
src✝ : M →ₗ[R] N := ↑f - ↑g
⊢ ∀ {x : L} {m : M},
    AddHom.toFun
        { toAddHom := src✝.toAddHom,
            map_smul' :=
              (_ :
                ∀ (r : R) (x : M),
                  AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
        ⁅x, m⁆ =
      ⁅x,
        AddHom.toFun
          { toAddHom := src✝.toAddHom,
              map_smul' :=
                (_ :
                  ∀ (r : R) (x : M),
                    AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
          m⁆

Next tactic:
simp
instance : Neg (M →ₗ⁅R,L⁆ N) where neg f := { -(f : M →ₗ[R] N) with map_lie' := by 

Proof state:
R : Type u
L : Type v
M : Type w
N : Type w₁
P : Type w₂
inst✝¹⁴ : CommRing R
inst✝¹³ : LieRing L
inst✝¹² : LieAlgebra R L
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieRingModule L N
inst✝³ : LieRingModule L P
inst✝² : LieModule R L M
inst✝¹ : LieModule R L N
inst✝ : LieModule R L P
f : M →ₗ⁅R,L⁆ N
src✝ : M →ₗ[R] N := -↑f
⊢ ∀ {x : L} {m : M},
    AddHom.toFun
        { toAddHom := src✝.toAddHom,
            map_smul' :=
              (_ :
                ∀ (r : R) (x : M),
                  AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
        ⁅x, m⁆ =
      ⁅x,
        AddHom.toFun
          { toAddHom := src✝.toAddHom,
              map_smul' :=
                (_ :
                  ∀ (r : R) (x : M),
                    AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
          m⁆

Next tactic:
simp
instance hasNSMul : SMul ℕ (M →ₗ⁅R,L⁆ N) where
  smul n f := { n • (f : M →ₗ[R] N) with map_lie' := by 

Proof state:
R : Type u
L : Type v
M : Type w
N : Type w₁
P : Type w₂
inst✝¹⁴ : CommRing R
inst✝¹³ : LieRing L
inst✝¹² : LieAlgebra R L
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieRingModule L N
inst✝³ : LieRingModule L P
inst✝² : LieModule R L M
inst✝¹ : LieModule R L N
inst✝ : LieModule R L P
n : ℕ
f : M →ₗ⁅R,L⁆ N
src✝ : M →ₗ[R] N := n • ↑f
⊢ ∀ {x : L} {m : M},
    AddHom.toFun
        { toAddHom := src✝.toAddHom,
            map_smul' :=
              (_ :
                ∀ (r : R) (x : M),
                  AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
        ⁅x, m⁆ =
      ⁅x,
        AddHom.toFun
          { toAddHom := src✝.toAddHom,
              map_smul' :=
                (_ :
                  ∀ (r : R) (x : M),
                    AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
          m⁆

Next tactic:
simp
instance hasZSMul : SMul ℤ (M →ₗ⁅R,L⁆ N) where
  smul z f := { z • (f : M →ₗ[R] N) with map_lie' := by 

Proof state:
R : Type u
L : Type v
M : Type w
N : Type w₁
P : Type w₂
inst✝¹⁴ : CommRing R
inst✝¹³ : LieRing L
inst✝¹² : LieAlgebra R L
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieRingModule L N
inst✝³ : LieRingModule L P
inst✝² : LieModule R L M
inst✝¹ : LieModule R L N
inst✝ : LieModule R L P
z : ℤ
f : M →ₗ⁅R,L⁆ N
src✝ : M →ₗ[R] N := z • ↑f
⊢ ∀ {x : L} {m : M},
    AddHom.toFun
        { toAddHom := src✝.toAddHom,
            map_smul' :=
              (_ :
                ∀ (r : R) (x : M),
                  AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
        ⁅x, m⁆ =
      ⁅x,
        AddHom.toFun
          { toAddHom := src✝.toAddHom,
              map_smul' :=
                (_ :
                  ∀ (r : R) (x : M),
                    AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
          m⁆

Next tactic:
simp
instance : SMul R (M →ₗ⁅R,L⁆ N) where smul t f := { t • (f : M →ₗ[R] N) with map_lie' := by 

Proof state:
R : Type u
L : Type v
M : Type w
N : Type w₁
P : Type w₂
inst✝¹⁴ : CommRing R
inst✝¹³ : LieRing L
inst✝¹² : LieAlgebra R L
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieRingModule L N
inst✝³ : LieRingModule L P
inst✝² : LieModule R L M
inst✝¹ : LieModule R L N
inst✝ : LieModule R L P
t : R
f : M →ₗ⁅R,L⁆ N
src✝ : M →ₗ[R] N := t • ↑f
⊢ ∀ {x : L} {m : M},
    AddHom.toFun
        { toAddHom := src✝.toAddHom,
            map_smul' :=
              (_ :
                ∀ (r : R) (x : M),
                  AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
        ⁅x, m⁆ =
      ⁅x,
        AddHom.toFun
          { toAddHom := src✝.toAddHom,
              map_smul' :=
                (_ :
                  ∀ (r : R) (x : M),
                    AddHom.toFun src✝.toAddHom (r • x) = (RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
          m⁆

Next tactic:
simp
instance : EquivLike (M ≃ₗ⁅R,L⁆ N) M N :=
  { coe := fun f => f.toFun,
    inv := fun f => f.invFun,
    left_inv := fun f => f.left_inv,
    right_inv := fun f => f.right_inv,
    coe_injective' := fun f g h₁ h₂ =>
      by 

Proof state:
R : Type u
L : Type v
M : Type w
N : Type w₁
P : Type w₂
inst✝¹⁴ : CommRing R
inst✝¹³ : LieRing L
inst✝¹² : LieAlgebra R L
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieRingModule L N
inst✝³ : LieRingModule L P
inst✝² : LieModule R L M
inst✝¹ : LieModule R L N
inst✝ : LieModule R L P
f g : M ≃ₗ⁅R,L⁆ N
h₁ : (fun f => f.toFun) f = (fun f => f.toFun) g
h₂ : (fun f => f.invFun) f = (fun f => f.invFun) g
⊢ f = g

Next tactic:
cases f
instance : EquivLike (M ≃ₗ⁅R,L⁆ N) M N :=
  { coe := fun f => f.toFun,
    inv := fun f => f.invFun,
    left_inv := fun f => f.left_inv,
    right_inv := fun f => f.right_inv,
    coe_injective' := fun f g h₁ h₂ =>
      by cases f; 

Proof state:
case mk
R : Type u
L : Type v
M : Type w
N : Type w₁
P : Type w₂
inst✝¹⁴ : CommRing R
inst✝¹³ : LieRing L
inst✝¹² : LieAlgebra R L
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieRingModule L N
inst✝³ : LieRingModule L P
inst✝² : LieModule R L M
inst✝¹ : LieModule R L N
inst✝ : LieModule R L P
g : M ≃ₗ⁅R,L⁆ N
toLieModuleHom✝ : M →ₗ⁅R,L⁆ N
invFun✝ : N → M
left_inv✝ : LeftInverse invFun✝ toLieModuleHom✝.toFun
right_inv✝ : Function.RightInverse invFun✝ toLieModuleHom✝.toFun
h₁ :
  (fun f => f.toFun)
      { toLieModuleHom := toLieModuleHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } =
    (fun f => f.toFun) g
h₂ :
  (fun f => f.invFun)
      { toLieModuleHom := toLieModuleHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } =
    (fun f => f.invFun) g
⊢ { toLieModuleHom := toLieModuleHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } = g

Next tactic:
cases g
instance : EquivLike (M ≃ₗ⁅R,L⁆ N) M N :=
  { coe := fun f => f.toFun,
    inv := fun f => f.invFun,
    left_inv := fun f => f.left_inv,
    right_inv := fun f => f.right_inv,
    coe_injective' := fun f g h₁ h₂ =>
      by cases f; cases g; 

Proof state:
case mk.mk
R : Type u
L : Type v
M : Type w
N : Type w₁
P : Type w₂
inst✝¹⁴ : CommRing R
inst✝¹³ : LieRing L
inst✝¹² : LieAlgebra R L
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieRingModule L N
inst✝³ : LieRingModule L P
inst✝² : LieModule R L M
inst✝¹ : LieModule R L N
inst✝ : LieModule R L P
toLieModuleHom✝¹ : M →ₗ⁅R,L⁆ N
invFun✝¹ : N → M
left_inv✝¹ : LeftInverse invFun✝¹ toLieModuleHom✝¹.toFun
right_inv✝¹ : Function.RightInverse invFun✝¹ toLieModuleHom✝¹.toFun
toLieModuleHom✝ : M →ₗ⁅R,L⁆ N
invFun✝ : N → M
left_inv✝ : LeftInverse invFun✝ toLieModuleHom✝.toFun
right_inv✝ : Function.RightInverse invFun✝ toLieModuleHom✝.toFun
h₁ :
  (fun f => f.toFun)
      { toLieModuleHom := toLieModuleHom✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =
    (fun f => f.toFun)
      { toLieModuleHom := toLieModuleHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }
h₂ :
  (fun f => f.invFun)
      { toLieModuleHom := toLieModuleHom✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =
    (fun f => f.invFun)
      { toLieModuleHom := toLieModuleHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }
⊢ { toLieModuleHom := toLieModuleHom✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =
    { toLieModuleHom := toLieModuleHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }

Next tactic:
simp at h₁ h₂
instance : EquivLike (M ≃ₗ⁅R,L⁆ N) M N :=
  { coe := fun f => f.toFun,
    inv := fun f => f.invFun,
    left_inv := fun f => f.left_inv,
    right_inv := fun f => f.right_inv,
    coe_injective' := fun f g h₁ h₂ =>
      by cases f; cases g; simp at h₁ h₂; 

Proof state:
case mk.mk
R : Type u
L : Type v
M : Type w
N : Type w₁
P : Type w₂
inst✝¹⁴ : CommRing R
inst✝¹³ : LieRing L
inst✝¹² : LieAlgebra R L
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieRingModule L N
inst✝³ : LieRingModule L P
inst✝² : LieModule R L M
inst✝¹ : LieModule R L N
inst✝ : LieModule R L P
toLieModuleHom✝¹ : M →ₗ⁅R,L⁆ N
invFun✝¹ : N → M
left_inv✝¹ : LeftInverse invFun✝¹ toLieModuleHom✝¹.toFun
right_inv✝¹ : Function.RightInverse invFun✝¹ toLieModuleHom✝¹.toFun
toLieModuleHom✝ : M →ₗ⁅R,L⁆ N
invFun✝ : N → M
left_inv✝ : LeftInverse invFun✝ toLieModuleHom✝.toFun
right_inv✝ : Function.RightInverse invFun✝ toLieModuleHom✝.toFun
h₂ : invFun✝¹ = invFun✝
h₁ : toLieModuleHom✝¹ = toLieModuleHom✝
⊢ { toLieModuleHom := toLieModuleHom✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =
    { toLieModuleHom := toLieModuleHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }

Next tactic:
simp [*]
theorem toEquiv_injective : Function.Injective (toEquiv : (M ≃ₗ⁅R,L⁆ N) → M ≃ N) := by
  

Proof state:
R : Type u
L : Type v
M : Type w
N : Type w₁
P : Type w₂
inst✝¹⁴ : CommRing R
inst✝¹³ : LieRing L
inst✝¹² : LieAlgebra R L
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieRingModule L N
inst✝³ : LieRingModule L P
inst✝² : LieModule R L M
inst✝¹ : LieModule R L N
inst✝ : LieModule R L P
⊢ Injective toEquiv

Next tactic:
rintro ⟨⟨⟨⟨f, -⟩, -⟩, -⟩, f_inv⟩ ⟨⟨⟨⟨g, -⟩, -⟩, -⟩, g_inv⟩
theorem toEquiv_injective : Function.Injective (toEquiv : (M ≃ₗ⁅R,L⁆ N) → M ≃ N) := by
  rintro ⟨⟨⟨⟨f, -⟩, -⟩, -⟩, f_inv⟩ ⟨⟨⟨⟨g, -⟩, -⟩, -⟩, g_inv⟩
  intro h
  simp only [toEquiv_mk, LieModuleHom.coe_mk, LinearMap.coe_mk, AddHom.coe_mk, Equiv.mk.injEq] at h
  

Proof state:
case mk.mk.mk.mk.mk.mk.mk.mk
R : Type u
L : Type v
M : Type w
N : Type w₁
P : Type w₂
inst✝¹⁴ : CommRing R
inst✝¹³ : LieRing L
inst✝¹² : LieAlgebra R L
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieRingModule L N
inst✝³ : LieRingModule L P
inst✝² : LieModule R L M
inst✝¹ : LieModule R L N
inst✝ : LieModule R L P
f_inv : N → M
f : M → N
map_add'✝¹ : ∀ (x y : M), f (x + y) = f x + f y
map_smul'✝¹ :
  ∀ (r : R) (x : M),
    AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } (r • x) =
      (RingHom.id R) r • AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } x
map_lie'✝¹ :
  ∀ {x : L} {m : M},
    AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom ⁅x, m⁆ =
      ⁅x, AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom m⁆
left_inv✝¹ :
  LeftInverse f_inv
    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },
            map_lie' := map_lie'✝¹ }).toAddHom.toFun
right_inv✝¹ :
  Function.RightInverse f_inv
    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },
            map_lie' := map_lie'✝¹ }).toAddHom.toFun
g_inv : N → M
g : M → N
map_add'✝ : ∀ (x y : M), g (x + y) = g x + g y
map_smul'✝ :
  ∀ (r : R) (x : M),
    AddHom.toFun { toFun := g, map_add' := map_add'✝ } (r • x) =
      (RingHom.id R) r • AddHom.toFun { toFun := g, map_add' := map_add'✝ } x
map_lie'✝ :
  ∀ {x : L} {m : M},
    AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom ⁅x, m⁆ =
      ⁅x, AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom m⁆
left_inv✝ :
  LeftInverse g_inv
    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },
            map_lie' := map_lie'✝ }).toAddHom.toFun
right_inv✝ :
  Function.RightInverse g_inv
    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },
            map_lie' := map_lie'✝ }).toAddHom.toFun
h : f = g ∧ f_inv = g_inv
⊢ {
      toLieModuleHom :=
        { toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },
          map_lie' := map_lie'✝¹ },
      invFun := f_inv, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =
    {
      toLieModuleHom :=
        { toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },
          map_lie' := map_lie'✝ },
      invFun := g_inv, left_inv := left_inv✝, right_inv := right_inv✝ }

Next tactic:
congr
@[simp]
theorem symm_symm (e : M ≃ₗ⁅R,L⁆ N) : e.symm.symm = e := by
  

Proof state:
R : Type u
L : Type v
M : Type w
N : Type w₁
P : Type w₂
inst✝¹⁴ : CommRing R
inst✝¹³ : LieRing L
inst✝¹² : LieAlgebra R L
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : AddCommGroup N
inst✝⁹ : AddCommGroup P
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieRingModule L N
inst✝³ : LieRingModule L P
inst✝² : LieModule R L M
inst✝¹ : LieModule R L N
inst✝ : LieModule R L P
e : M ≃ₗ⁅R,L⁆ N
⊢ symm (symm e) = e

Next tactic:
rfl
theorem sameRay_iff : SameRay ℝ x y ↔ x = 0 ∨ y = 0 ∨ x.arg = y.arg := by
  

Proof state:
x y : ℂ
⊢ SameRay ℝ x y ↔ x = 0 ∨ y = 0 ∨ arg x = arg y

Next tactic:
rcases eq_or_ne x 0 with (rfl | hx)
theorem sameRay_iff : SameRay ℝ x y ↔ x = 0 ∨ y = 0 ∨ x.arg = y.arg := by
  rcases eq_or_ne x 0 with (rfl | hx)
  · 

Proof state:
case inl
y : ℂ
⊢ SameRay ℝ 0 y ↔ 0 = 0 ∨ y = 0 ∨ arg 0 = arg y

Next tactic:
simp
theorem sameRay_iff : SameRay ℝ x y ↔ x = 0 ∨ y = 0 ∨ x.arg = y.arg := by
  rcases eq_or_ne x 0 with (rfl | hx)
  · simp
  

Proof state:
case inr
x y : ℂ
hx : x ≠ 0
⊢ SameRay ℝ x y ↔ x = 0 ∨ y = 0 ∨ arg x = arg y

Next tactic:
rcases eq_or_ne y 0 with (rfl | hy)
theorem sameRay_iff : SameRay ℝ x y ↔ x = 0 ∨ y = 0 ∨ x.arg = y.arg := by
  rcases eq_or_ne x 0 with (rfl | hx)
  · simp
  rcases eq_or_ne y 0 with (rfl | hy)
  · 

Proof state:
case inr.inl
x : ℂ
hx : x ≠ 0
⊢ SameRay ℝ x 0 ↔ x = 0 ∨ 0 = 0 ∨ arg x = arg 0

Next tactic:
simp
theorem sameRay_iff : SameRay ℝ x y ↔ x = 0 ∨ y = 0 ∨ x.arg = y.arg := by
  rcases eq_or_ne x 0 with (rfl | hx)
  · simp
  rcases eq_or_ne y 0 with (rfl | hy)
  · simp
  

Proof state:
case inr.inr
x y : ℂ
hx : x ≠ 0
hy : y ≠ 0
⊢ SameRay ℝ x y ↔ x = 0 ∨ y = 0 ∨ arg x = arg y

Next tactic:
simp only [hx, hy, false_or_iff, sameRay_iff_norm_smul_eq, arg_eq_arg_iff hx hy]
theorem sameRay_iff : SameRay ℝ x y ↔ x = 0 ∨ y = 0 ∨ x.arg = y.arg := by
  rcases eq_or_ne x 0 with (rfl | hx)
  · simp
  rcases eq_or_ne y 0 with (rfl | hy)
  · simp
  simp only [hx, hy, false_or_iff, sameRay_iff_norm_smul_eq, arg_eq_arg_iff hx hy]
  

Proof state:
case inr.inr
x y : ℂ
hx : x ≠ 0
hy : y ≠ 0
⊢ ‖x‖ • y = ‖y‖ • x ↔ ↑(abs y) / ↑(abs x) * x = y

Next tactic:
field_simp [hx, hy]
theorem sameRay_iff : SameRay ℝ x y ↔ x = 0 ∨ y = 0 ∨ x.arg = y.arg := by
  rcases eq_or_ne x 0 with (rfl | hx)
  · simp
  rcases eq_or_ne y 0 with (rfl | hy)
  · simp
  simp only [hx, hy, false_or_iff, sameRay_iff_norm_smul_eq, arg_eq_arg_iff hx hy]
  field_simp [hx, hy]
  

Proof state:
case inr.inr
x y : ℂ
hx : x ≠ 0
hy : y ≠ 0
⊢ ↑(abs x) * y = ↑(abs y) * x ↔ ↑(abs y) * x = y * ↑(abs x)

Next tactic:
rw [mul_comm, eq_comm]
theorem sameRay_iff_arg_div_eq_zero : SameRay ℝ x y ↔ arg (x / y) = 0 := by
  

Proof state:
x y : ℂ
⊢ SameRay ℝ x y ↔ arg (x / y) = 0

Next tactic:
rw [← Real.Angle.toReal_zero, ← arg_coe_angle_eq_iff_eq_toReal, sameRay_iff]
theorem sameRay_iff_arg_div_eq_zero : SameRay ℝ x y ↔ arg (x / y) = 0 := by
  rw [← Real.Angle.toReal_zero, ← arg_coe_angle_eq_iff_eq_toReal, sameRay_iff]
  

Proof state:
x y : ℂ
⊢ x = 0 ∨ y = 0 ∨ arg x = arg y ↔ ↑(arg (x / y)) = 0

Next tactic:
by_cases hx : x = 0
theorem sameRay_iff_arg_div_eq_zero : SameRay ℝ x y ↔ arg (x / y) = 0 := by
  rw [← Real.Angle.toReal_zero, ← arg_coe_angle_eq_iff_eq_toReal, sameRay_iff]
  by_cases hx : x = 0; · 

Proof state:
case pos
x y : ℂ
hx : x = 0
⊢ x = 0 ∨ y = 0 ∨ arg x = arg y ↔ ↑(arg (x / y)) = 0

Next tactic:
simp [hx]
theorem sameRay_iff_arg_div_eq_zero : SameRay ℝ x y ↔ arg (x / y) = 0 := by
  rw [← Real.Angle.toReal_zero, ← arg_coe_angle_eq_iff_eq_toReal, sameRay_iff]
  by_cases hx : x = 0; · simp [hx]
  

Proof state:
case neg
x y : ℂ
hx : ¬x = 0
⊢ x = 0 ∨ y = 0 ∨ arg x = arg y ↔ ↑(arg (x / y)) = 0

Next tactic:
by_cases hy : y = 0
theorem sameRay_iff_arg_div_eq_zero : SameRay ℝ x y ↔ arg (x / y) = 0 := by
  rw [← Real.Angle.toReal_zero, ← arg_coe_angle_eq_iff_eq_toReal, sameRay_iff]
  by_cases hx : x = 0; · simp [hx]
  by_cases hy : y = 0; · 

Proof state:
case pos
x y : ℂ
hx : ¬x = 0
hy : y = 0
⊢ x = 0 ∨ y = 0 ∨ arg x = arg y ↔ ↑(arg (x / y)) = 0

Next tactic:
simp [hy]
theorem sameRay_iff_arg_div_eq_zero : SameRay ℝ x y ↔ arg (x / y) = 0 := by
  rw [← Real.Angle.toReal_zero, ← arg_coe_angle_eq_iff_eq_toReal, sameRay_iff]
  by_cases hx : x = 0; · simp [hx]
  by_cases hy : y = 0; · simp [hy]
  

Proof state:
case neg
x y : ℂ
hx : ¬x = 0
hy : ¬y = 0
⊢ x = 0 ∨ y = 0 ∨ arg x = arg y ↔ ↑(arg (x / y)) = 0

Next tactic:
simp [hx, hy, arg_div_coe_angle, sub_eq_zero]
/-- Induction step in M. Riesz extension theorem. Given a convex cone `s` in a vector space `E`,
a partially defined linear map `f : f.domain → ℝ`, assume that `f` is nonnegative on `f.domain ∩ p`
and `p + s = E`. If `f` is not defined on the whole `E`, then we can extend it to a larger
submodule without breaking the non-negativity condition. -/
theorem step (nonneg : ∀ x : f.domain, (x : E) ∈ s → 0 ≤ f x)
    (dense : ∀ y, ∃ x : f.domain, (x : E) + y ∈ s) (hdom : f.domain ≠ ⊤) :
    ∃ g, f < g ∧ ∀ x : g.domain, (x : E) ∈ s → 0 ≤ g x := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s : ConvexCone ℝ E
f : E →ₗ.[ℝ] ℝ
nonneg : ∀ (x : ↥f.domain), ↑x ∈ s → 0 ≤ ↑f x
dense : ∀ (y : E), ∃ x, ↑x + y ∈ s
hdom : f.domain ≠ ⊤
⊢ ∃ g, f < g ∧ ∀ (x : ↥g.domain), ↑x ∈ s → 0 ≤ ↑g x

Next tactic:
obtain ⟨y, -, hy⟩ : ∃ y ∈ ⊤, y ∉ f.domain :=
    @SetLike.exists_of_lt (Submodule ℝ E) _ _ _ _ (lt_top_iff_ne_top.2 hdom)
/-- Induction step in M. Riesz extension theorem. Given a convex cone `s` in a vector space `E`,
a partially defined linear map `f : f.domain → ℝ`, assume that `f` is nonnegative on `f.domain ∩ p`
and `p + s = E`. If `f` is not defined on the whole `E`, then we can extend it to a larger
submodule without breaking the non-negativity condition. -/
theorem step (nonneg : ∀ x : f.domain, (x : E) ∈ s → 0 ≤ f x)
    (dense : ∀ y, ∃ x : f.domain, (x : E) + y ∈ s) (hdom : f.domain ≠ ⊤) :
    ∃ g, f < g ∧ ∀ x : g.domain, (x : E) ∈ s → 0 ≤ g x := by
  obtain ⟨y, -, hy⟩ : ∃ y ∈ ⊤, y ∉ f.domain :=
    @SetLike.exists_of_lt (Submodule ℝ E) _ _ _ _ (lt_top_iff_ne_top.2 hdom)
  

Proof state:
case intro.intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s : ConvexCone ℝ E
f : E →ₗ.[ℝ] ℝ
nonneg : ∀ (x : ↥f.domain), ↑x ∈ s → 0 ≤ ↑f x
dense : ∀ (y : E), ∃ x, ↑x + y ∈ s
hdom : f.domain ≠ ⊤
y : E
hy : y ∉ f.domain
⊢ ∃ g, f < g ∧ ∀ (x : ↥g.domain), ↑x ∈ s → 0 ≤ ↑g x

Next tactic:
obtain ⟨c, le_c, c_le⟩ :
      ∃ c, (∀ x : f.domain, -(x : E) - y ∈ s → f x ≤ c) ∧
        ∀ x : f.domain, (x : E) + y ∈ s → c ≤ f x := by
    set Sp := f '' { x : f.domain | (x : E) + y ∈ s }
    set Sn := f '' { x : f.domain | -(x : E) - y ∈ s }
    suffices (upperBounds Sn ∩ lowerBounds Sp).Nonempty by
      simpa only [Set.Nonempty, upperBounds, lowerBounds, ball_image_iff] using this
    refine' exists_between_of_forall_le (Nonempty.image f _) (Nonempty.image f (dense y)) _
    · rcases dense (-y) with ⟨x, hx⟩
      rw [← neg_neg x, AddSubgroupClass.coe_neg, ← sub_eq_add_neg] at hx
      exact ⟨_, hx⟩
    rintro a ⟨xn, hxn, rfl⟩ b ⟨xp, hxp, rfl⟩
    have := s.add_mem hxp hxn
    rw [add_assoc, add_sub_cancel'_right, ← sub_eq_add_neg, ← AddSubgroupClass.coe_sub] at this
    replace := nonneg _ this
    rwa [f.map_sub, sub_nonneg] at this