awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Module: Mathlib.Algebra.Algebra.Subalgebra.Lattice
Goal:
R : Type uR
A : Type uA
inst : CommSemiring R
inst_1 : Semiring A
inst_2 : Algebra R A
s : Set A
p :
  (x y : A) →
    Membership.mem (γ := Subalgebra R A) (adjoin R s) x → Membership.mem (γ := Subalgebra R A) (adjoin R s) y → Prop
mem_mem : ∀ (x y : A) (hx : x ∈ s) (hy : y ∈ s), p x y ⋯ ⋯
algebraMap_both : ∀ (r₁ r₂ : R), p ((algebraMap R A : (a : R) → A) r₁) ((algebraMap R A : (a : R) → A) r₂) ⋯ ⋯
algebraMap_left : ∀ (r : R) (x : A) (hx : x ∈ s), p ((algebraMap R A : (a : R) → A) r) x ⋯ ⋯
algebraMap_right : ∀ (r : R) (x : A) (hx : x ∈ s), p x ((algebraMap R A : (a : R) → A) r) ⋯ ⋯
add_left :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y : A
r : R
x_1 y_1 : A
hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x_1
hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y_1
h₁ : p x_1 ((algebraMap R A : (a : R) → A) r) hx ⋯
h₂ : p y_1 ((algebraMap R A : (a : R) → A) r) hy ⋯
⊢ p (x_1 + y_1) ((algebraMap R A : (a : R) → A) r) ⋯ ⋯

Tactic:
add_left _ _ _ _ _ _ h₁ h₂
-- Module: Mathlib.Algebra.Algebra.Subalgebra.Lattice
Goal:
R : Type uR
A : Type uA
inst : CommSemiring R
inst_1 : Semiring A
inst_2 : Algebra R A
s : Set A
p :
  (x y : A) →
    Membership.mem (γ := Subalgebra R A) (adjoin R s) x → Membership.mem (γ := Subalgebra R A) (adjoin R s) y → Prop
mem_mem : ∀ (x y : A) (hx : x ∈ s) (hy : y ∈ s), p x y ⋯ ⋯
algebraMap_both : ∀ (r₁ r₂ : R), p ((algebraMap R A : (a : R) → A) r₁) ((algebraMap R A : (a : R) → A) r₂) ⋯ ⋯
algebraMap_left : ∀ (r : R) (x : A) (hx : x ∈ s), p ((algebraMap R A : (a : R) → A) r) x ⋯ ⋯
algebraMap_right : ∀ (r : R) (x : A) (hx : x ∈ s), p x ((algebraMap R A : (a : R) → A) r) ⋯ ⋯
add_left :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y : A
r : R
x_1 y_1 : A
hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x_1
hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y_1
h₁ : p x_1 ((algebraMap R A : (a : R) → A) r) hx ⋯
h₂ : p y_1 ((algebraMap R A : (a : R) → A) r) hy ⋯
⊢ p (x_1 + y_1) ((algebraMap R A : (a : R) → A) r) ⋯ ⋯

Tactic:
exact add_left _ _ _ _ _ _ h₁ h₂
-- Module: Mathlib.Algebra.Algebra.Subalgebra.Lattice
Goal:
R : Type uR
A : Type uA
inst : CommSemiring R
inst_1 : Semiring A
inst_2 : Algebra R A
s : Set A
p :
  (x y : A) →
    Membership.mem (γ := Subalgebra R A) (adjoin R s) x → Membership.mem (γ := Subalgebra R A) (adjoin R s) y → Prop
mem_mem : ∀ (x y : A) (hx : x ∈ s) (hy : y ∈ s), p x y ⋯ ⋯
algebraMap_both :
  ∀ (r₁ r₂ : R), p ((Algebra.algebraMap R A : (a : R) → A) r₁) ((Algebra.algebraMap R A : (a : R) → A) r₂) ⋯ ⋯
algebraMap_left : ∀ (r : R) (x : A) (hx : x ∈ s), p ((Algebra.algebraMap R A : (a : R) → A) r) x ⋯ ⋯
algebraMap_right : ∀ (r : R) (x : A) (hx : x ∈ s), p x ((Algebra.algebraMap R A : (a : R) → A) r) ⋯ ⋯
add_left :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y : A
hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x
r : R
algebraMap : ∀ (x : A) (h : x ∈ s), p x ((Algebra.algebraMap R A : (a : R) → A) r) ⋯ ⋯
algebraMap₁ : ∀ (r_1 : R), p ((Algebra.algebraMap R A : (a : R) → A) r_1) ((Algebra.algebraMap R A : (a : R) → A) r) ⋯ ⋯
algebraMap₂ :
  ∀ (x y : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (h₁ : p x ((Algebra.algebraMap R A : (a : R) → A) r) hx ⋯)
    (h₂ : p y ((Algebra.algebraMap R A : (a : R) → A) r) hy ⋯), p (x * y) ((Algebra.algebraMap R A : (a : R) → A) r) ⋯ ⋯
algebraMap₃ :
  ∀ (x y : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (h₁ : p x ((Algebra.algebraMap R A : (a : R) → A) r) hx ⋯)
    (h₂ : p y ((Algebra.algebraMap R A : (a : R) → A) r) hy ⋯), p (x + y) ((Algebra.algebraMap R A : (a : R) → A) r) ⋯ ⋯
⊢ p x ((Algebra.algebraMap R A : (a : R) → A) r) hx ⋯

Tactic:
induction hx using adjoin_induction with
    | mem _ h => exact algebraMap_right _ _ h
    | algebraMap _ => exact algebraMap_both _ _
    | mul _ _ _ _ h₁ h₂ => exact mul_left _ _ _ _ _ _ h₁ h₂
    | add _ _ _ _ h₁ h₂ => exact add_left _ _ _ _ _ _ h₁ h₂

Premises used: Algebra.algebraMap, Submodule.mul, Submodule.add
-- Module: Mathlib.Algebra.Algebra.Subalgebra.Lattice
Goal:
R : Type uR
A : Type uA
inst : CommSemiring R
inst_1 : Semiring A
inst_2 : Algebra R A
s : Set A
p :
  (x y : A) →
    Membership.mem (γ := Subalgebra R A) (adjoin R s) x → Membership.mem (γ := Subalgebra R A) (adjoin R s) y → Prop
mem_mem : ∀ (x y : A) (hx : x ∈ s) (hy : y ∈ s), p x y ⋯ ⋯
algebraMap_both : ∀ (r₁ r₂ : R), p ((algebraMap R A : (a : R) → A) r₁) ((algebraMap R A : (a : R) → A) r₂) ⋯ ⋯
algebraMap_left : ∀ (r : R) (x : A) (hx : x ∈ s), p ((algebraMap R A : (a : R) → A) r) x ⋯ ⋯
algebraMap_right : ∀ (r : R) (x : A) (hx : x ∈ s), p x ((algebraMap R A : (a : R) → A) r) ⋯ ⋯
add_left :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y : A
hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x
x_1 y_1 : A
hx_1 : Membership.mem (γ := Subalgebra R A) (adjoin R s) x_1
hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y_1
h₁ : p x x_1 hx hx_1
h₂ : p x y_1 hx hy
⊢ p x (x_1 * y_1) hx ⋯

Tactic:
mul_right _ _ _ _ _ _ h₁ h₂
-- Module: Mathlib.Algebra.Algebra.Subalgebra.Lattice
Goal:
R : Type uR
A : Type uA
inst : CommSemiring R
inst_1 : Semiring A
inst_2 : Algebra R A
s : Set A
p :
  (x y : A) →
    Membership.mem (γ := Subalgebra R A) (adjoin R s) x → Membership.mem (γ := Subalgebra R A) (adjoin R s) y → Prop
mem_mem : ∀ (x y : A) (hx : x ∈ s) (hy : y ∈ s), p x y ⋯ ⋯
algebraMap_both : ∀ (r₁ r₂ : R), p ((algebraMap R A : (a : R) → A) r₁) ((algebraMap R A : (a : R) → A) r₂) ⋯ ⋯
algebraMap_left : ∀ (r : R) (x : A) (hx : x ∈ s), p ((algebraMap R A : (a : R) → A) r) x ⋯ ⋯
algebraMap_right : ∀ (r : R) (x : A) (hx : x ∈ s), p x ((algebraMap R A : (a : R) → A) r) ⋯ ⋯
add_left :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y : A
hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x
x_1 y_1 : A
hx_1 : Membership.mem (γ := Subalgebra R A) (adjoin R s) x_1
hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y_1
h₁ : p x x_1 hx hx_1
h₂ : p x y_1 hx hy
⊢ p x (x_1 * y_1) hx ⋯

Tactic:
exact mul_right _ _ _ _ _ _ h₁ h₂
-- Module: Mathlib.Algebra.Algebra.Subalgebra.Lattice
Goal:
R : Type uR
A : Type uA
inst : CommSemiring R
inst_1 : Semiring A
inst_2 : Algebra R A
s : Set A
p :
  (x y : A) →
    Membership.mem (γ := Subalgebra R A) (adjoin R s) x → Membership.mem (γ := Subalgebra R A) (adjoin R s) y → Prop
mem_mem : ∀ (x y : A) (hx : x ∈ s) (hy : y ∈ s), p x y ⋯ ⋯
algebraMap_both : ∀ (r₁ r₂ : R), p ((algebraMap R A : (a : R) → A) r₁) ((algebraMap R A : (a : R) → A) r₂) ⋯ ⋯
algebraMap_left : ∀ (r : R) (x : A) (hx : x ∈ s), p ((algebraMap R A : (a : R) → A) r) x ⋯ ⋯
algebraMap_right : ∀ (r : R) (x : A) (hx : x ∈ s), p x ((algebraMap R A : (a : R) → A) r) ⋯ ⋯
add_left :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y : A
hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x
x_1 y_1 : A
hx_1 : Membership.mem (γ := Subalgebra R A) (adjoin R s) x_1
hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y_1
h₁ : p x x_1 hx hx_1
h₂ : p x y_1 hx hy
⊢ p x (x_1 + y_1) hx ⋯

Tactic:
add_right _ _ _ _ _ _ h₁ h₂
-- Module: Mathlib.Algebra.Algebra.Subalgebra.Lattice
Goal:
R : Type uR
A : Type uA
inst : CommSemiring R
inst_1 : Semiring A
inst_2 : Algebra R A
s : Set A
p :
  (x y : A) →
    Membership.mem (γ := Subalgebra R A) (adjoin R s) x → Membership.mem (γ := Subalgebra R A) (adjoin R s) y → Prop
mem_mem : ∀ (x y : A) (hx : x ∈ s) (hy : y ∈ s), p x y ⋯ ⋯
algebraMap_both : ∀ (r₁ r₂ : R), p ((algebraMap R A : (a : R) → A) r₁) ((algebraMap R A : (a : R) → A) r₂) ⋯ ⋯
algebraMap_left : ∀ (r : R) (x : A) (hx : x ∈ s), p ((algebraMap R A : (a : R) → A) r) x ⋯ ⋯
algebraMap_right : ∀ (r : R) (x : A) (hx : x ∈ s), p x ((algebraMap R A : (a : R) → A) r) ⋯ ⋯
add_left :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y : A
hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x
x_1 y_1 : A
hx_1 : Membership.mem (γ := Subalgebra R A) (adjoin R s) x_1
hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y_1
h₁ : p x x_1 hx hx_1
h₂ : p x y_1 hx hy
⊢ p x (x_1 + y_1) hx ⋯

Tactic:
exact add_right _ _ _ _ _ _ h₁ h₂
-- Module: Mathlib.Algebra.Algebra.Subalgebra.Lattice
Goal:
R : Type uR
A : Type uA
inst : CommSemiring R
inst_1 : Semiring A
inst_2 : Algebra R A
s : Set A
p :
  (x y : A) →
    Membership.mem (γ := Subalgebra R A) (adjoin R s) x → Membership.mem (γ := Subalgebra R A) (adjoin R s) y → Prop
mem_mem : ∀ (x y : A) (hx : x ∈ s) (hy : y ∈ s), p x y ⋯ ⋯
algebraMap_both :
  ∀ (r₁ r₂ : R), p ((Algebra.algebraMap R A : (a : R) → A) r₁) ((Algebra.algebraMap R A : (a : R) → A) r₂) ⋯ ⋯
algebraMap_left : ∀ (r : R) (x : A) (hx : x ∈ s), p ((Algebra.algebraMap R A : (a : R) → A) r) x ⋯ ⋯
algebraMap_right : ∀ (r : R) (x : A) (hx : x ∈ s), p x ((Algebra.algebraMap R A : (a : R) → A) r) ⋯ ⋯
add_left :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : A) (hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y)
    (hz : Membership.mem (γ := Subalgebra R A) (adjoin R s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y : A
hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x
hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y
mem : ∀ (z : A) (hz : z ∈ s), p x z hx ⋯
algebraMap : ∀ (r : R), p x ((Algebra.algebraMap R A : (a : R) → A) r) hx ⋯
mul :
  ∀ (x_1 y : A) (hx_1 : Membership.mem (γ := Subalgebra R A) (adjoin R s) x_1)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y) (h₁ : p x x_1 hx hx_1) (h₂ : p x y hx hy),
    p x (x_1 * y) hx ⋯
add :
  ∀ (x_1 y : A) (hx_1 : Membership.mem (γ := Subalgebra R A) (adjoin R s) x_1)
    (hy : Membership.mem (γ := Subalgebra R A) (adjoin R s) y) (h₁ : p x x_1 hx hx_1) (h₂ : p x y hx hy),
    p x (x_1 + y) hx ⋯
⊢ p x y hx hy

Tactic:
induction hy using adjoin_induction with
  | mem z hz => induction hx using adjoin_induction with
    | mem _ h => exact mem_mem _ _ h hz
    | algebraMap _ => exact algebraMap_left _ _ hz
    | mul _ _ _ _ h₁ h₂ => exact mul_left _ _ _ _ _ _ h₁ h₂
    | add _ _ _ _ h₁ h₂ => exact add_left _ _ _ _ _ _ h₁ h₂
  | algebraMap r =>
    induction hx using adjoin_induction with
    | mem _ h => exact algebraMap_right _ _ h
    | algebraMap _ => exact algebraMap_both _ _
    | mul _ _ _ _ h₁ h₂ => exact mul_left _ _ _ _ _ _ h₁ h₂
    | add _ _ _ _ h₁ h₂ => exact add_left _ _ _ _ _ _ h₁ h₂
  | mul _ _ _ _ h₁ h₂ => exact mul_right _ _ _ _ _ _ h₁ h₂
  | add _ _ _ _ h₁ h₂ => exact add_right _ _ _ _ _ _ h₁ h₂

Premises used: Algebra.algebraMap, Submodule.mul, Submodule.add
-- Module: Mathlib.Algebra.Algebra.Subalgebra.Lattice
Goal:
R : Type uR
A : Type uA
inst : CommSemiring R
inst_1 : Semiring A
inst_2 : Algebra R A
s : Set A
⊢ Eq (α := Subalgebra R ↥(adjoin R s))
    (adjoin R (Subtype.val (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) ⁻¹' s)) ⊤

Tactic:
eq_top_iff.2 fun ⟨x, hx⟩ ↦
      adjoin_induction (fun a ha ↦ ?_) (fun r ↦ ?_) (fun _ _ _ _ ↦ ?_) (fun _ _ _ _ ↦ ?_) hx

Premises used: Iff.mpr, Algebra.adjoin, Membership.mem, Algebra.adjoin_induction, _private.0.Algebra.adjoin_adjoin_coe_preimage.match_1, Set.preimage, Algebra.eq_top_iff, Subtype.val
-- Module: Mathlib.Algebra.Algebra.Subalgebra.Lattice
Goal:
R : Type uR
A : Type uA
inst : CommSemiring R
inst_1 : Semiring A
inst_2 : Algebra R A
s : Set A
x_1 : ↥(adjoin R s)
x : A
hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x
a : A
ha : a ∈ s
⊢ Membership.mem (γ := Subalgebra R ↥(adjoin R s))
    (adjoin R (Subtype.val (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) ⁻¹' s))
    (Subtype.mk (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) a ⋯)

Tactic:
subset_adjoin ha

Premises used: Algebra.subset_adjoin
-- Module: Mathlib.Algebra.Algebra.Subalgebra.Lattice
Goal:
R : Type uR
A : Type uA
inst : CommSemiring R
inst_1 : Semiring A
inst_2 : Algebra R A
s : Set A
x_1 : ↥(adjoin R s)
x : A
hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x
a : A
ha : a ∈ s
⊢ Membership.mem (γ := Subalgebra R ↥(adjoin R s))
    (adjoin R (Subtype.val (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) ⁻¹' s))
    (Subtype.mk (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) a ⋯)

Tactic:
exact subset_adjoin ha

Premises used: Algebra.subset_adjoin
-- Module: Mathlib.Algebra.Algebra.Subalgebra.Lattice
Goal:
R : Type uR
A : Type uA
inst : CommSemiring R
inst_1 : Semiring A
inst_2 : Algebra R A
s : Set A
x_1 : ↥(adjoin R s)
x : A
hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x
r : R
⊢ Membership.mem (α := ↥(adjoin R s)) (γ := Subalgebra R ↥(adjoin R s))
    (adjoin R (Subtype.val (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) ⁻¹' s))
    (Subtype.mk (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
        ((algebraMap R A : (a : R) → A) r) ⋯ :
      ↥(adjoin R s))

Tactic:
Subalgebra.algebraMap_mem _ r

Premises used: Set.Mem, Subalgebra.algebraMap_mem
-- Module: Mathlib.Algebra.Algebra.Subalgebra.Lattice
Goal:
R : Type uR
A : Type uA
inst : CommSemiring R
inst_1 : Semiring A
inst_2 : Algebra R A
s : Set A
x_1 : ↥(adjoin R s)
x : A
hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x
r : R
⊢ Membership.mem (α := ↥(adjoin R s)) (γ := Subalgebra R ↥(adjoin R s))
    (adjoin R (Subtype.val (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) ⁻¹' s))
    (Subtype.mk (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x)
        ((algebraMap R A : (a : R) → A) r) ⋯ :
      ↥(adjoin R s))

Tactic:
exact Subalgebra.algebraMap_mem _ r

Premises used: Subalgebra.algebraMap_mem
-- Module: Mathlib.Algebra.Algebra.Subalgebra.Lattice
Goal:
R : Type uR
A : Type uA
inst : CommSemiring R
inst_1 : Semiring A
inst_2 : Algebra R A
s : Set A
x_1 : ↥(adjoin R s)
x : A
hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x
x_2 x_3 : A
h : Membership.mem (γ := Subalgebra R A) (adjoin R s) x_2
h_1 : Membership.mem (γ := Subalgebra R A) (adjoin R s) x_3
⊢ Membership.mem (γ := Subalgebra R ↥(adjoin R s))
      (adjoin R (Subtype.val (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) ⁻¹' s))
      (Subtype.mk (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) x_2 h) →
    Membership.mem (γ := Subalgebra R ↥(adjoin R s))
        (adjoin R (Subtype.val (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) ⁻¹' s))
        (Subtype.mk (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) x_3 h_1) →
      Membership.mem (γ := Subalgebra R ↥(adjoin R s))
        (adjoin R (Subtype.val (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) ⁻¹' s))
        (Subtype.mk (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) (x_2 + x_3) ⋯)

Tactic:
Subalgebra.add_mem _

Premises used: Set.Mem, Subalgebra.add_mem
-- Module: Mathlib.Algebra.Algebra.Subalgebra.Lattice
Goal:
R : Type uR
A : Type uA
inst : CommSemiring R
inst_1 : Semiring A
inst_2 : Algebra R A
s : Set A
x_1 : ↥(adjoin R s)
x : A
hx : Membership.mem (γ := Subalgebra R A) (adjoin R s) x
x_2 x_3 : A
h : Membership.mem (γ := Subalgebra R A) (adjoin R s) x_2
h_1 : Membership.mem (γ := Subalgebra R A) (adjoin R s) x_3
⊢ Membership.mem (γ := Subalgebra R ↥(adjoin R s))
      (adjoin R (Subtype.val (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) ⁻¹' s))
      (Subtype.mk (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) x_2 h) →
    Membership.mem (γ := Subalgebra R ↥(adjoin R s))
        (adjoin R (Subtype.val (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) ⁻¹' s))
        (Subtype.mk (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) x_3 h_1) →
      Membership.mem (γ := Subalgebra R ↥(adjoin R s))
        (adjoin R (Subtype.val (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) ⁻¹' s))
        (Subtype.mk (p := fun (x : A) ↦ Membership.mem (γ := Subalgebra R A) (adjoin R s) x) (x_2 + x_3) ⋯)

Tactic:
exact Subalgebra.add_mem _

Premises used: Subalgebra.add_mem