awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Module: Mathlib.RingTheory.NonUnitalSubsemiring.Basic
Goal:
R : Type u
inst : NonUnitalNonAssocSemiring R
s : Set R
p :
  (x y : R) →
    Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x →
      Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y → Prop
mem_mem : ∀ (x : R) (hx : x ∈ s) (y : R) (hy : y ∈ s), p x y ⋯ ⋯
zero_left : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p 0 x ⋯ hx
zero_right : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p x 0 hx ⋯
add_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y z : R
hz : z ∈ s
x_1 y_1 : R
hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x_1
hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y_1
h₁ : p x_1 z hx ⋯
h₂ : p y_1 z hy ⋯
⊢ p (x_1 * y_1) z ⋯ ⋯

Tactic:
exact mul_left _ _ _ _ _ _ h₁ h₂
-- Module: Mathlib.RingTheory.NonUnitalSubsemiring.Basic
Goal:
R : Type u
inst : NonUnitalNonAssocSemiring R
s : Set R
p :
  (x y : R) →
    Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x →
      Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y → Prop
mem_mem : ∀ (x : R) (hx : x ∈ s) (y : R) (hy : y ∈ s), p x y ⋯ ⋯
zero_left : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p 0 x ⋯ hx
zero_right : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p x 0 hx ⋯
add_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y z : R
hz : z ∈ s
x_1 y_1 : R
hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x_1
hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y_1
h₁ : p x_1 z hx ⋯
h₂ : p y_1 z hy ⋯
⊢ p (x_1 + y_1) z ⋯ ⋯

Tactic:
add_left _ _ _ _ _ _ h₁ h₂
-- Module: Mathlib.RingTheory.NonUnitalSubsemiring.Basic
Goal:
R : Type u
inst : NonUnitalNonAssocSemiring R
s : Set R
p :
  (x y : R) →
    Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x →
      Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y → Prop
mem_mem : ∀ (x : R) (hx : x ∈ s) (y : R) (hy : y ∈ s), p x y ⋯ ⋯
zero_left : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p 0 x ⋯ hx
zero_right : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p x 0 hx ⋯
add_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y z : R
hz : z ∈ s
x_1 y_1 : R
hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x_1
hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y_1
h₁ : p x_1 z hx ⋯
h₂ : p y_1 z hy ⋯
⊢ p (x_1 + y_1) z ⋯ ⋯

Tactic:
exact add_left _ _ _ _ _ _ h₁ h₂
-- Module: Mathlib.RingTheory.NonUnitalSubsemiring.Basic
Goal:
R : Type u
inst : NonUnitalNonAssocSemiring R
s : Set R
p :
  (x y : R) →
    Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x →
      Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y → Prop
mem_mem : ∀ (x : R) (hx : x ∈ s) (y : R) (hy : y ∈ s), p x y ⋯ ⋯
zero_left : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p 0 x ⋯ hx
zero_right : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p x 0 hx ⋯
add_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y : R
hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x
z : R
hz : z ∈ s
mem : ∀ (x : R) (h : x ∈ s), p x z ⋯ ⋯
mem₁ : p 0 z ⋯ ⋯
mem₂ :
  ∀ (x y : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y) (h₁ : p x z hx ⋯) (h₂ : p y z hy ⋯),
    p (x * y) z ⋯ ⋯
mem₃ :
  ∀ (x y : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y) (h₁ : p x z hx ⋯) (h₂ : p y z hy ⋯),
    p (x + y) z ⋯ ⋯
⊢ p x z hx ⋯

Tactic:
induction hx using closure_induction with
    | mem _ h => exact mem_mem _ h _ hz
    | zero => exact zero_left _ _
    | mul _ _ _ _ h₁ h₂ => exact mul_left _ _ _ _ _ _ h₁ h₂
    | add _ _ _ _ h₁ h₂ => exact add_left _ _ _ _ _ _ h₁ h₂
-- Module: Mathlib.RingTheory.NonUnitalSubsemiring.Basic
Goal:
R : Type u
inst : NonUnitalNonAssocSemiring R
s : Set R
p :
  (x y : R) →
    Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x →
      Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y → Prop
mem_mem : ∀ (x : R) (hx : x ∈ s) (y : R) (hy : y ∈ s), p x y ⋯ ⋯
zero_left : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p 0 x ⋯ hx
zero_right : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p x 0 hx ⋯
add_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y : R
hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x
⊢ p x 0 hx ⋯

Tactic:
zero_right x hx
-- Module: Mathlib.RingTheory.NonUnitalSubsemiring.Basic
Goal:
R : Type u
inst : NonUnitalNonAssocSemiring R
s : Set R
p :
  (x y : R) →
    Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x →
      Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y → Prop
mem_mem : ∀ (x : R) (hx : x ∈ s) (y : R) (hy : y ∈ s), p x y ⋯ ⋯
zero_left : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p 0 x ⋯ hx
zero_right : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p x 0 hx ⋯
add_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y : R
hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x
⊢ p x 0 hx ⋯

Tactic:
exact zero_right x hx
-- Module: Mathlib.RingTheory.NonUnitalSubsemiring.Basic
Goal:
R : Type u
inst : NonUnitalNonAssocSemiring R
s : Set R
p :
  (x y : R) →
    Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x →
      Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y → Prop
mem_mem : ∀ (x : R) (hx : x ∈ s) (y : R) (hy : y ∈ s), p x y ⋯ ⋯
zero_left : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p 0 x ⋯ hx
zero_right : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p x 0 hx ⋯
add_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y : R
hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x
x_1 y_1 : R
hx_1 : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x_1
hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure 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.RingTheory.NonUnitalSubsemiring.Basic
Goal:
R : Type u
inst : NonUnitalNonAssocSemiring R
s : Set R
p :
  (x y : R) →
    Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x →
      Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y → Prop
mem_mem : ∀ (x : R) (hx : x ∈ s) (y : R) (hy : y ∈ s), p x y ⋯ ⋯
zero_left : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p 0 x ⋯ hx
zero_right : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p x 0 hx ⋯
add_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y : R
hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x
x_1 y_1 : R
hx_1 : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x_1
hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure 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.RingTheory.NonUnitalSubsemiring.Basic
Goal:
R : Type u
inst : NonUnitalNonAssocSemiring R
s : Set R
p :
  (x y : R) →
    Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x →
      Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y → Prop
mem_mem : ∀ (x : R) (hx : x ∈ s) (y : R) (hy : y ∈ s), p x y ⋯ ⋯
zero_left : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p 0 x ⋯ hx
zero_right : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p x 0 hx ⋯
add_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y : R
hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x
x_1 y_1 : R
hx_1 : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x_1
hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure 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.RingTheory.NonUnitalSubsemiring.Basic
Goal:
R : Type u
inst : NonUnitalNonAssocSemiring R
s : Set R
p :
  (x y : R) →
    Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x →
      Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y → Prop
mem_mem : ∀ (x : R) (hx : x ∈ s) (y : R) (hy : y ∈ s), p x y ⋯ ⋯
zero_left : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p 0 x ⋯ hx
zero_right : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p x 0 hx ⋯
add_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y : R
hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x
x_1 y_1 : R
hx_1 : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x_1
hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure 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.RingTheory.NonUnitalSubsemiring.Basic
Goal:
R : Type u
inst : NonUnitalNonAssocSemiring R
s : Set R
p :
  (x y : R) →
    Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x →
      Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y → Prop
mem_mem : ∀ (x : R) (hx : x ∈ s) (y : R) (hy : y ∈ s), p x y ⋯ ⋯
zero_left : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p 0 x ⋯ hx
zero_right : ∀ (x : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x), p x 0 hx ⋯
add_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x + y) z ⋯ hz
add_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y + z) hx ⋯
mul_left :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x z hx hz → p y z hy hz → p (x * y) z ⋯ hz
mul_right :
  ∀ (x y z : R) (hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y)
    (hz : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) z), p x y hx hy → p x z hx hz → p x (y * z) hx ⋯
x y : R
hx : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x
hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) y
mem : ∀ (z : R) (hz : z ∈ s), p x z hx ⋯
zero : p x 0 hx ⋯
mul :
  ∀ (x_1 y : R) (hx_1 : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x_1)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure 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 : R) (hx_1 : Membership.mem (γ := NonUnitalSubsemiring R) (closure s) x_1)
    (hy : Membership.mem (γ := NonUnitalSubsemiring R) (closure 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 closure_induction with
  | mem z hz => induction hx using closure_induction with
    | mem _ h => exact mem_mem _ h _ hz
    | zero => exact zero_left _ _
    | mul _ _ _ _ h₁ h₂ => exact mul_left _ _ _ _ _ _ h₁ h₂
    | add _ _ _ _ h₁ h₂ => exact add_left _ _ _ _ _ _ h₁ h₂
  | zero => exact zero_right x hx
  | mul _ _ _ _ h₁ h₂ => exact mul_right _ _ _ _ _ _ h₁ h₂
  | add _ _ _ _ h₁ h₂ => exact add_right _ _ _ _ _ _ h₁ h₂
-- Module: Mathlib.RingTheory.NonUnitalSubsemiring.Basic
Goal:
R : Type u
inst : NonUnitalNonAssocSemiring R
s : NonUnitalSubsemiring R
⊢ closure (↑s : Set R) = s

Tactic:
(NonUnitalSubsemiring.gi R).l_u_eq s

Premises used: NonUnitalSubsemiring.gi, GaloisInsertion.l_u_eq
-- Module: Mathlib.RingTheory.NonUnitalSubsemiring.Basic
Goal:
R : Type u
inst : NonUnitalNonAssocSemiring R
⊢ Eq.{u + 1} (α := NonUnitalSubsemiring R) (closure ∅) ⊥

Tactic:
(NonUnitalSubsemiring.gi R).gc.l_bot

Premises used: GaloisConnection.l_bot, NonUnitalSubsemiring.gi, GaloisInsertion.gc
-- Module: Mathlib.RingTheory.NonUnitalSubsemiring.Basic
Goal:
R : Type u
inst : NonUnitalNonAssocSemiring R
⊢ Eq.{u + 1} (α := NonUnitalSubsemiring R) (closure Set.univ) ⊤

Tactic:
@coe_top R _ ▸ closure_eq ⊤

Premises used: Eq.rec, Top.top, NonUnitalSubsemiring.coe_top, NonUnitalSubsemiring.closure_eq
-- Module: Mathlib.RingTheory.NonUnitalSubsemiring.Basic
Goal:
R : Type u
inst : NonUnitalNonAssocSemiring R
s t : Set R
⊢ Eq (α := NonUnitalSubsemiring R) (closure (s ∪ t)) (closure s ⊔ closure t)

Tactic:
(NonUnitalSubsemiring.gi R).gc.l_sup

Premises used: NonUnitalSubsemiring.gi, GaloisConnection.l_sup, GaloisInsertion.gc
-- Module: Mathlib.RingTheory.NonUnitalSubsemiring.Basic
Goal:
R : Type u
inst : NonUnitalNonAssocSemiring R
ι : Sort u_2
s : ι → Set R
⊢ Eq.{u + 1} (α := NonUnitalSubsemiring R) (closure (⋃ (i : ι), s i)) (⨆ (i : ι), closure (s i))

Tactic:
(NonUnitalSubsemiring.gi R).gc.l_iSup

Premises used: GaloisConnection.l_iSup, NonUnitalSubsemiring.gi, Set.iUnion, GaloisInsertion.gc
-- Module: Mathlib.RingTheory.NonUnitalSubsemiring.Basic
Goal:
R : Type u
inst : NonUnitalNonAssocSemiring R
s : Set (Set R)
⊢ Eq (α := NonUnitalSubsemiring R) (closure (⋃₀ s)) (⨆ t ∈ s, closure t)

Tactic:
(NonUnitalSubsemiring.gi R).gc.l_sSup

Premises used: Set.sUnion, GaloisConnection.l_sSup, NonUnitalSubsemiring.gi, GaloisInsertion.gc