Theorem: Subfield.closure_induction
File: Mathlib/FieldTheory/Subfield.lean

tactic: letI : Subfield K :=
  ⟨⟨⟨⟨⟨p, by intro _ _; exact Hmul _ _⟩, H1⟩,
    by intro _ _; exact Hadd _ _, @add_neg_self K _ 1 ▸ Hadd _ _ H1 (Hneg _ H1)⟩,
      by intro _; exact Hneg _⟩, Hinv⟩
state_before: K : Type u
L : Type v
M : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field M
s : Set K
p : K → Prop
x : K
h : x ∈ closure s
Hs : ∀ (x : K), x ∈ s → p x
H1 : p 1
Hadd : ∀ (x y : K), p x → p y → p (x + y)
Hneg : ∀ (x : K), p x → p (-x)
Hinv : ∀ (x : K), p x → p x⁻¹
Hmul : ∀ (x y : K), p x → p y → p (x * y)
⊢ p x

tactic: exact (closure_le (t := this)).2 Hs h
state_before: K : Type u
L : Type v
M : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field M
s : Set K
p : K → Prop
x : K
h : x ∈ closure s
Hs : ∀ (x : K), x ∈ s → p x
H1 : p 1
Hadd : ∀ (x y : K), p x → p y → p (x + y)
Hneg : ∀ (x : K), p x → p (-x)
Hinv : ∀ (x : K), p x → p x⁻¹
Hmul : ∀ (x y : K), p x → p y → p (x * y)
this : Subfield K :=
  {
    toSubring :=
      {
        toSubsemiring :=
          {
            toSubmonoid :=
              { toSubsemigroup := { carrier := p, mul_mem' := (_ : ∀ {a b : K}, p a → p b → p (a * b)) },
                one_mem' := H1 },
            add_mem' := (_ : ∀ {a b : K}, p a → p b → p (a + b)), zero_mem' := (_ : p 0) },
        neg_mem' := (_ : ∀ {x : K}, p x → p (-x)) },
    inv_mem' := Hinv }
⊢ p x

tactic: intro _ _
state_before: K : Type u
L : Type v
M : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field M
s : Set K
p : K → Prop
x : K
h : x ∈ closure s
Hs : ∀ (x : K), x ∈ s → p x
H1 : p 1
Hadd : ∀ (x y : K), p x → p y → p (x + y)
Hneg : ∀ (x : K), p x → p (-x)
Hinv : ∀ (x : K), p x → p x⁻¹
Hmul : ∀ (x y : K), p x → p y → p (x * y)
⊢ ∀ {a b : K}, a ∈ p → b ∈ p → a * b ∈ p

tactic: exact Hmul _ _
state_before: K : Type u
L : Type v
M : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field M
s : Set K
p : K → Prop
x : K
h : x ∈ closure s
Hs : ∀ (x : K), x ∈ s → p x
H1 : p 1
Hadd : ∀ (x y : K), p x → p y → p (x + y)
Hneg : ∀ (x : K), p x → p (-x)
Hinv : ∀ (x : K), p x → p x⁻¹
Hmul : ∀ (x y : K), p x → p y → p (x * y)
a✝ b✝ : K
⊢ a✝ ∈ p → b✝ ∈ p → a✝ * b✝ ∈ p

tactic: intro _ _
state_before: K : Type u
L : Type v
M : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field M
s : Set K
p : K → Prop
x : K
h : x ∈ closure s
Hs : ∀ (x : K), x ∈ s → p x
H1 : p 1
Hadd : ∀ (x y : K), p x → p y → p (x + y)
Hneg : ∀ (x : K), p x → p (-x)
Hinv : ∀ (x : K), p x → p x⁻¹
Hmul : ∀ (x y : K), p x → p y → p (x * y)
⊢ ∀ {a b : K},
    a ∈
        { toSubsemigroup := { carrier := p, mul_mem' := (_ : ∀ {a b : K}, p a → p b → p (a * b)) },
              one_mem' := H1 }.toSubsemigroup.carrier →
      b ∈
          { toSubsemigroup := { carrier := p, mul_mem' := (_ : ∀ {a b : K}, p a → p b → p (a * b)) },
                one_mem' := H1 }.toSubsemigroup.carrier →
        a + b ∈
          { toSubsemigroup := { carrier := p, mul_mem' := (_ : ∀ {a b : K}, p a → p b → p (a * b)) },
                one_mem' := H1 }.toSubsemigroup.carrier

tactic: exact Hadd _ _
state_before: K : Type u
L : Type v
M : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field M
s : Set K
p : K → Prop
x : K
h : x ∈ closure s
Hs : ∀ (x : K), x ∈ s → p x
H1 : p 1
Hadd : ∀ (x y : K), p x → p y → p (x + y)
Hneg : ∀ (x : K), p x → p (-x)
Hinv : ∀ (x : K), p x → p x⁻¹
Hmul : ∀ (x y : K), p x → p y → p (x * y)
a✝ b✝ : K
⊢ a✝ ∈
      { toSubsemigroup := { carrier := p, mul_mem' := (_ : ∀ {a b : K}, p a → p b → p (a * b)) },
            one_mem' := H1 }.toSubsemigroup.carrier →
    b✝ ∈
        { toSubsemigroup := { carrier := p, mul_mem' := (_ : ∀ {a b : K}, p a → p b → p (a * b)) },
              one_mem' := H1 }.toSubsemigroup.carrier →
      a✝ + b✝ ∈
        { toSubsemigroup := { carrier := p, mul_mem' := (_ : ∀ {a b : K}, p a → p b → p (a * b)) },
              one_mem' := H1 }.toSubsemigroup.carrier

tactic: intro _
state_before: K : Type u
L : Type v
M : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field M
s : Set K
p : K → Prop
x : K
h : x ∈ closure s
Hs : ∀ (x : K), x ∈ s → p x
H1 : p 1
Hadd : ∀ (x y : K), p x → p y → p (x + y)
Hneg : ∀ (x : K), p x → p (-x)
Hinv : ∀ (x : K), p x → p x⁻¹
Hmul : ∀ (x y : K), p x → p y → p (x * y)
⊢ ∀ {x : K},
    x ∈
        {
                toSubmonoid :=
                  { toSubsemigroup := { carrier := p, mul_mem' := (_ : ∀ {a b : K}, p a → p b → p (a * b)) },
                    one_mem' := H1 },
                add_mem' := (_ : ∀ {a b : K}, p a → p b → p (a + b)),
                zero_mem' := (_ : p 0) }.toSubmonoid.toSubsemigroup.carrier →
      -x ∈
        {
                toSubmonoid :=
                  { toSubsemigroup := { carrier := p, mul_mem' := (_ : ∀ {a b : K}, p a → p b → p (a * b)) },
                    one_mem' := H1 },
                add_mem' := (_ : ∀ {a b : K}, p a → p b → p (a + b)),
                zero_mem' := (_ : p 0) }.toSubmonoid.toSubsemigroup.carrier

tactic: exact Hneg _
state_before: K : Type u
L : Type v
M : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field M
s : Set K
p : K → Prop
x : K
h : x ∈ closure s
Hs : ∀ (x : K), x ∈ s → p x
H1 : p 1
Hadd : ∀ (x y : K), p x → p y → p (x + y)
Hneg : ∀ (x : K), p x → p (-x)
Hinv : ∀ (x : K), p x → p x⁻¹
Hmul : ∀ (x y : K), p x → p y → p (x * y)
x✝ : K
⊢ x✝ ∈
      {
              toSubmonoid :=
                { toSubsemigroup := { carrier := p, mul_mem' := (_ : ∀ {a b : K}, p a → p b → p (a * b)) },
                  one_mem' := H1 },
              add_mem' := (_ : ∀ {a b : K}, p a → p b → p (a + b)),
              zero_mem' := (_ : p 0) }.toSubmonoid.toSubsemigroup.carrier →
    -x✝ ∈
      {
              toSubmonoid :=
                { toSubsemigroup := { carrier := p, mul_mem' := (_ : ∀ {a b : K}, p a → p b → p (a * b)) },
                  one_mem' := H1 },
              add_mem' := (_ : ∀ {a b : K}, p a → p b → p (a + b)),
              zero_mem' := (_ : p 0) }.toSubmonoid.toSubsemigroup.carrier