[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : SetLike S R
inst✝ : NonUnitalSubsemiringClass S R
s : S
⊢ ∀ (x y : { x // x ∈ s }), ↑(x + y) = ↑x + ↑y
[PROOFSTEP]
simp
[GOAL]
R✝ : Type u
S : Type v
T : Type w
inst✝⁵ : NonUnitalNonAssocSemiring R✝
M : Subsemigroup R✝
inst✝⁴ : SetLike S R✝
inst✝³ : NonUnitalSubsemiringClass S R✝
s : S
R : Type ?u.22770
inst✝² : NonUnitalSemiring R
inst✝¹ : SetLike S R
inst✝ : NonUnitalSubsemiringClass S R
⊢ ∀ (x y : { x // x ∈ s }), ↑(x + y) = ↑x + ↑y
[PROOFSTEP]
simp
[GOAL]
R✝ : Type u
S : Type v
T : Type w
inst✝⁵ : NonUnitalNonAssocSemiring R✝
M : Subsemigroup R✝
inst✝⁴ : SetLike S R✝
inst✝³ : NonUnitalSubsemiringClass S R✝
s : S
R : Type ?u.28609
inst✝² : NonUnitalCommSemiring R
inst✝¹ : SetLike S R
inst✝ : NonUnitalSubsemiringClass S R
⊢ ∀ (x y : { x // x ∈ s }), ↑(x + y) = ↑x + ↑y
[PROOFSTEP]
simp
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
p q : NonUnitalSubsemiring R
h : (fun s => s.carrier) p = (fun s => s.carrier) q
⊢ p = q
[PROOFSTEP]
cases p
[GOAL]
case mk
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
q : NonUnitalSubsemiring R
toAddSubmonoid✝ : AddSubmonoid R
mul_mem'✝ : ∀ {a b : R}, a ∈ toAddSubmonoid✝.carrier → b ∈ toAddSubmonoid✝.carrier → a * b ∈ toAddSubmonoid✝.carrier
h : (fun s => s.carrier) { toAddSubmonoid := toAddSubmonoid✝, mul_mem' := mul_mem'✝ } = (fun s => s.carrier) q
⊢ { toAddSubmonoid := toAddSubmonoid✝, mul_mem' := mul_mem'✝ } = q
[PROOFSTEP]
cases q
[GOAL]
case mk.mk
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
toAddSubmonoid✝¹ : AddSubmonoid R
mul_mem'✝¹ : ∀ {a b : R}, a ∈ toAddSubmonoid✝¹.carrier → b ∈ toAddSubmonoid✝¹.carrier → a * b ∈ toAddSubmonoid✝¹.carrier
toAddSubmonoid✝ : AddSubmonoid R
mul_mem'✝ : ∀ {a b : R}, a ∈ toAddSubmonoid✝.carrier → b ∈ toAddSubmonoid✝.carrier → a * b ∈ toAddSubmonoid✝.carrier
h :
  (fun s => s.carrier) { toAddSubmonoid := toAddSubmonoid✝¹, mul_mem' := mul_mem'✝¹ } =
    (fun s => s.carrier) { toAddSubmonoid := toAddSubmonoid✝, mul_mem' := mul_mem'✝ }
⊢ { toAddSubmonoid := toAddSubmonoid✝¹, mul_mem' := mul_mem'✝¹ } =
    { toAddSubmonoid := toAddSubmonoid✝, mul_mem' := mul_mem'✝ }
[PROOFSTEP]
congr
[GOAL]
case mk.mk.e_toAddSubmonoid
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
toAddSubmonoid✝¹ : AddSubmonoid R
mul_mem'✝¹ : ∀ {a b : R}, a ∈ toAddSubmonoid✝¹.carrier → b ∈ toAddSubmonoid✝¹.carrier → a * b ∈ toAddSubmonoid✝¹.carrier
toAddSubmonoid✝ : AddSubmonoid R
mul_mem'✝ : ∀ {a b : R}, a ∈ toAddSubmonoid✝.carrier → b ∈ toAddSubmonoid✝.carrier → a * b ∈ toAddSubmonoid✝.carrier
h :
  (fun s => s.carrier) { toAddSubmonoid := toAddSubmonoid✝¹, mul_mem' := mul_mem'✝¹ } =
    (fun s => s.carrier) { toAddSubmonoid := toAddSubmonoid✝, mul_mem' := mul_mem'✝ }
⊢ toAddSubmonoid✝¹ = toAddSubmonoid✝
[PROOFSTEP]
exact SetLike.coe_injective' h
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
sg : Subsemigroup R
hg : ↑sg = s
sa : AddSubmonoid R
ha : ↑sa = s
⊢ ∀ {a b : R}, a ∈ s → b ∈ s → a + b ∈ s
[PROOFSTEP]
subst ha
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
sg : Subsemigroup R
sa : AddSubmonoid R
hg : ↑sg = ↑sa
⊢ ∀ {a b : R}, a ∈ ↑sa → b ∈ ↑sa → a + b ∈ ↑sa
[PROOFSTEP]
exact sa.add_mem
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
sg : Subsemigroup R
hg : ↑sg = s
sa : AddSubmonoid R
ha : ↑sa = s
⊢ 0 ∈ { carrier := s, add_mem' := (_ : ∀ {a b : R}, a ∈ s → b ∈ s → a + b ∈ s) }.carrier
[PROOFSTEP]
subst ha
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
sg : Subsemigroup R
sa : AddSubmonoid R
hg : ↑sg = ↑sa
⊢ 0 ∈ { carrier := ↑sa, add_mem' := (_ : ∀ {a b : R}, a ∈ ↑sa → b ∈ ↑sa → a + b ∈ ↑sa) }.carrier
[PROOFSTEP]
exact sa.zero_mem
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
sg : Subsemigroup R
hg : ↑sg = s
sa : AddSubmonoid R
ha : ↑sa = s
⊢ ∀ {a b : R},
    a ∈
        { toAddSubsemigroup := { carrier := s, add_mem' := (_ : ∀ {a b : R}, a ∈ s → b ∈ s → a + b ∈ s) },
              zero_mem' :=
                (_ :
                  0 ∈
                    { carrier := s,
                        add_mem' :=
                          (_ : ∀ {a b : R}, a ∈ s → b ∈ s → a + b ∈ s) }.carrier) }.toAddSubsemigroup.carrier →
      b ∈
          { toAddSubsemigroup := { carrier := s, add_mem' := (_ : ∀ {a b : R}, a ∈ s → b ∈ s → a + b ∈ s) },
                zero_mem' :=
                  (_ :
                    0 ∈
                      { carrier := s,
                          add_mem' :=
                            (_ : ∀ {a b : R}, a ∈ s → b ∈ s → a + b ∈ s) }.carrier) }.toAddSubsemigroup.carrier →
        a * b ∈
          { toAddSubsemigroup := { carrier := s, add_mem' := (_ : ∀ {a b : R}, a ∈ s → b ∈ s → a + b ∈ s) },
                zero_mem' :=
                  (_ :
                    0 ∈
                      { carrier := s,
                          add_mem' :=
                            (_ : ∀ {a b : R}, a ∈ s → b ∈ s → a + b ∈ s) }.carrier) }.toAddSubsemigroup.carrier
[PROOFSTEP]
subst hg
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
sg : Subsemigroup R
sa : AddSubmonoid R
ha : ↑sa = ↑sg
⊢ ∀ {a b : R},
    a ∈
        { toAddSubsemigroup := { carrier := ↑sg, add_mem' := (_ : ∀ {a b : R}, a ∈ ↑sg → b ∈ ↑sg → a + b ∈ ↑sg) },
              zero_mem' :=
                (_ :
                  0 ∈
                    { carrier := ↑sg,
                        add_mem' :=
                          (_ : ∀ {a b : R}, a ∈ ↑sg → b ∈ ↑sg → a + b ∈ ↑sg) }.carrier) }.toAddSubsemigroup.carrier →
      b ∈
          { toAddSubsemigroup := { carrier := ↑sg, add_mem' := (_ : ∀ {a b : R}, a ∈ ↑sg → b ∈ ↑sg → a + b ∈ ↑sg) },
                zero_mem' :=
                  (_ :
                    0 ∈
                      { carrier := ↑sg,
                          add_mem' :=
                            (_ : ∀ {a b : R}, a ∈ ↑sg → b ∈ ↑sg → a + b ∈ ↑sg) }.carrier) }.toAddSubsemigroup.carrier →
        a * b ∈
          { toAddSubsemigroup := { carrier := ↑sg, add_mem' := (_ : ∀ {a b : R}, a ∈ ↑sg → b ∈ ↑sg → a + b ∈ ↑sg) },
                zero_mem' :=
                  (_ :
                    0 ∈
                      { carrier := ↑sg,
                          add_mem' :=
                            (_ : ∀ {a b : R}, a ∈ ↑sg → b ∈ ↑sg → a + b ∈ ↑sg) }.carrier) }.toAddSubsemigroup.carrier
[PROOFSTEP]
exact sg.mul_mem
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝⁴ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝³ : NonUnitalNonAssocSemiring S
inst✝² : NonUnitalNonAssocSemiring T
F : Type u_1
G : Type u_2
inst✝¹ : NonUnitalRingHomClass F R S
inst✝ : NonUnitalRingHomClass G S T
s✝ : NonUnitalSubsemiring R
f : F
s : NonUnitalSubsemiring R
y : S
⊢ y ∈ map f s ↔ ∃ x, x ∈ s ∧ ↑f x = y
[PROOFSTEP]
convert Set.mem_image_iff_bex
[GOAL]
case h.e'_2.h.e'_2.h.a
R : Type u
S : Type v
T : Type w
inst✝⁴ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝³ : NonUnitalNonAssocSemiring S
inst✝² : NonUnitalNonAssocSemiring T
F : Type u_1
G : Type u_2
inst✝¹ : NonUnitalRingHomClass F R S
inst✝ : NonUnitalRingHomClass G S T
s✝ : NonUnitalSubsemiring R
f : F
s : NonUnitalSubsemiring R
y : S
x✝ : R
⊢ x✝ ∈ s ∧ ↑f x✝ = y ↔ ∃ x, ↑f x✝ = y
[PROOFSTEP]
simp
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝⁴ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝³ : NonUnitalNonAssocSemiring S
inst✝² : NonUnitalNonAssocSemiring T
F : Type u_1
G : Type u_2
inst✝¹ : NonUnitalRingHomClass F R S
inst✝ : NonUnitalRingHomClass G S T
f : F
g : G
⊢ srange f = map f ⊤
[PROOFSTEP]
ext
[GOAL]
case h
R : Type u
S : Type v
T : Type w
inst✝⁴ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝³ : NonUnitalNonAssocSemiring S
inst✝² : NonUnitalNonAssocSemiring T
F : Type u_1
G : Type u_2
inst✝¹ : NonUnitalRingHomClass F R S
inst✝ : NonUnitalRingHomClass G S T
f : F
g : G
x✝ : S
⊢ x✝ ∈ srange f ↔ x✝ ∈ map f ⊤
[PROOFSTEP]
simp
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝⁴ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝³ : NonUnitalNonAssocSemiring S
inst✝² : NonUnitalNonAssocSemiring T
F : Type u_1
G : Type u_2
inst✝¹ : NonUnitalRingHomClass F R S
inst✝ : NonUnitalRingHomClass G S T
f✝ : F
g✝ : G
g : S →ₙ+* T
f : R →ₙ+* S
⊢ map g (srange f) = srange (comp g f)
[PROOFSTEP]
simpa only [srange_eq_map] using (⊤ : NonUnitalSubsemiring R).map_map g f
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
a✝ b✝ : R
x✝¹ : a✝ ∈ {0}
x✝ : b✝ ∈ {0}
⊢ a✝ + b✝ ∈ {0}
[PROOFSTEP]
simp_all
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
a✝ b✝ : R
x✝¹ :
  a✝ ∈
    { toAddSubsemigroup := { carrier := {0}, add_mem' := (_ : ∀ {a b : R}, a ∈ {0} → b ∈ {0} → a + b ∈ {0}) },
          zero_mem' := (_ : 0 ∈ {0}) }.toAddSubsemigroup.carrier
x✝ :
  b✝ ∈
    { toAddSubsemigroup := { carrier := {0}, add_mem' := (_ : ∀ {a b : R}, a ∈ {0} → b ∈ {0} → a + b ∈ {0}) },
          zero_mem' := (_ : 0 ∈ {0}) }.toAddSubsemigroup.carrier
⊢ a✝ * b✝ ∈
    { toAddSubsemigroup := { carrier := {0}, add_mem' := (_ : ∀ {a b : R}, a ∈ {0} → b ∈ {0} → a + b ∈ {0}) },
          zero_mem' := (_ : 0 ∈ {0}) }.toAddSubsemigroup.carrier
[PROOFSTEP]
simp_all
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set (NonUnitalSubsemiring R)
⊢ ↑(⨅ (t : NonUnitalSubsemiring R) (_ : t ∈ s), toSubsemigroup t) = ⋂ (t : NonUnitalSubsemiring R) (_ : t ∈ s), ↑t
[PROOFSTEP]
simp
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set (NonUnitalSubsemiring R)
⊢ ↑(⨅ (t : NonUnitalSubsemiring R) (_ : t ∈ s), t.toAddSubmonoid) = ⋂ (t : NonUnitalSubsemiring R) (_ : t ∈ s), ↑t
[PROOFSTEP]
simp
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
f : R ≃+* S
K : NonUnitalSubsemiring R
x : S
⊢ x ∈ map (↑f) K ↔ ↑(RingEquiv.symm f) x ∈ K
[PROOFSTEP]
convert @Set.mem_image_equiv _ _ (↑K) f.toEquiv x
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
⊢ nonUnitalSubsemiringClosure M = NonUnitalSubsemiring.closure ↑M
[PROOFSTEP]
ext
[GOAL]
case h
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
x✝ : R
⊢ x✝ ∈ nonUnitalSubsemiringClosure M ↔ x✝ ∈ NonUnitalSubsemiring.closure ↑M
[PROOFSTEP]
refine ⟨fun hx => ?_, fun hx => (NonUnitalSubsemiring.mem_closure.mp hx) M.nonUnitalSubsemiringClosure fun s sM => ?_⟩
[GOAL]
case h.refine_1
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
x✝ : R
hx : x✝ ∈ nonUnitalSubsemiringClosure M
⊢ x✝ ∈ NonUnitalSubsemiring.closure ↑M
[PROOFSTEP]
rintro - ⟨H1, rfl⟩
[GOAL]
case h.refine_2
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
x✝ : R
hx : x✝ ∈ NonUnitalSubsemiring.closure ↑M
s : R
sM : s ∈ ↑M
⊢ s ∈ ↑(nonUnitalSubsemiringClosure M)
[PROOFSTEP]
rintro - ⟨H1, rfl⟩
[GOAL]
case h.refine_1.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
x✝ : R
hx : x✝ ∈ nonUnitalSubsemiringClosure M
H1 : NonUnitalSubsemiring R
⊢ x✝ ∈ (fun t => ⋂ (_ : t ∈ {S | ↑M ⊆ ↑S}), ↑t) H1
[PROOFSTEP]
rintro - ⟨H2, rfl⟩
[GOAL]
case h.refine_2.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
x✝ : R
hx : x✝ ∈ NonUnitalSubsemiring.closure ↑M
s : R
sM : s ∈ ↑M
H1 : AddSubmonoid R
⊢ s ∈ (fun t => ⋂ (_ : t ∈ {S | ↑M ⊆ ↑S}), ↑t) H1
[PROOFSTEP]
rintro - ⟨H2, rfl⟩
[GOAL]
case h.refine_1.intro.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
x✝ : R
hx : x✝ ∈ nonUnitalSubsemiringClosure M
H1 : NonUnitalSubsemiring R
H2 : H1 ∈ {S | ↑M ⊆ ↑S}
⊢ x✝ ∈ (fun h => ↑H1) H2
[PROOFSTEP]
exact AddSubmonoid.mem_closure.mp hx H1.toAddSubmonoid H2
[GOAL]
case h.refine_2.intro.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
x✝ : R
hx : x✝ ∈ NonUnitalSubsemiring.closure ↑M
s : R
sM : s ∈ ↑M
H1 : AddSubmonoid R
H2 : H1 ∈ {S | ↑M ⊆ ↑S}
⊢ s ∈ (fun h => ↑H1) H2
[PROOFSTEP]
exact H2 sM
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
⊢ ↑(closure s) = ↑(AddSubmonoid.closure ↑(Subsemigroup.closure s))
[PROOFSTEP]
simp [← Subsemigroup.nonUnitalSubsemiringClosure_toAddSubmonoid, Subsemigroup.nonUnitalSubsemiringClosure_eq_closure]
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
⊢ closure ↑(AddSubmonoid.closure s) = closure s
[PROOFSTEP]
ext x
[GOAL]
case h
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
x : R
⊢ x ∈ closure ↑(AddSubmonoid.closure s) ↔ x ∈ closure s
[PROOFSTEP]
refine' ⟨fun hx => _, fun hx => closure_mono AddSubmonoid.subset_closure hx⟩
[GOAL]
case h
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
x : R
hx : x ∈ closure ↑(AddSubmonoid.closure s)
⊢ x ∈ closure s
[PROOFSTEP]
rintro - ⟨H, rfl⟩
[GOAL]
case h.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
x : R
hx : x ∈ closure ↑(AddSubmonoid.closure s)
H : NonUnitalSubsemiring R
⊢ x ∈ (fun t => ⋂ (_ : t ∈ {S | s ⊆ ↑S}), ↑t) H
[PROOFSTEP]
rintro - ⟨J, rfl⟩
[GOAL]
case h.intro.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
x : R
hx : x ∈ closure ↑(AddSubmonoid.closure s)
H : NonUnitalSubsemiring R
J : H ∈ {S | s ⊆ ↑S}
⊢ x ∈ (fun h => ↑H) J
[PROOFSTEP]
refine' (AddSubmonoid.mem_closure.mp (mem_closure_iff.mp hx)) H.toAddSubmonoid fun y hy => _
[GOAL]
case h.intro.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
x : R
hx : x ∈ closure ↑(AddSubmonoid.closure s)
H : NonUnitalSubsemiring R
J : H ∈ {S | s ⊆ ↑S}
y : R
hy : y ∈ ↑(Subsemigroup.closure ↑(AddSubmonoid.closure s))
⊢ y ∈ ↑H.toAddSubmonoid
[PROOFSTEP]
refine' (Subsemigroup.mem_closure.mp hy) H.toSubsemigroup fun z hz => _
[GOAL]
case h.intro.intro
R : Type u
S : Type v
T : Type w
inst✝² : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring T
s : Set R
x : R
hx : x ∈ closure ↑(AddSubmonoid.closure s)
H : NonUnitalSubsemiring R
J : H ∈ {S | s ⊆ ↑S}
y : R
hy : y ∈ ↑(Subsemigroup.closure ↑(AddSubmonoid.closure s))
z : R
hz : z ∈ ↑(AddSubmonoid.closure s)
⊢ z ∈ ↑(toSubsemigroup H)
[PROOFSTEP]
exact (AddSubmonoid.mem_closure.mp hz) H.toAddSubmonoid fun w hw => J hw
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S
s : NonUnitalSubsemiring R
x : R × S
⊢ x ∈ prod s ⊤ ↔ x ∈ comap (NonUnitalRingHom.fst R S) s
[PROOFSTEP]
simp [mem_prod, MonoidHom.coe_fst]
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S
s : NonUnitalSubsemiring S
x : R × S
⊢ x ∈ prod ⊤ s ↔ x ∈ comap (NonUnitalRingHom.snd R S) s
[PROOFSTEP]
simp [mem_prod, MonoidHom.coe_snd]
[GOAL]
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
ι : Sort u_2
hι : Nonempty ι
S : ι → NonUnitalSubsemiring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
⊢ x ∈ ⨆ (i : ι), S i ↔ ∃ i, x ∈ S i
[PROOFSTEP]
refine' ⟨_, fun ⟨i, hi⟩ => (SetLike.le_def.1 <| le_iSup S i) hi⟩
[GOAL]
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
ι : Sort u_2
hι : Nonempty ι
S : ι → NonUnitalSubsemiring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
⊢ x ∈ ⨆ (i : ι), S i → ∃ i, x ∈ S i
[PROOFSTEP]
let U : NonUnitalSubsemiring R :=
  NonUnitalSubsemiring.mk' (⋃ i, (S i : Set R)) (⨆ i, (S i).toSubsemigroup)
    (Subsemigroup.coe_iSup_of_directed <| hS.mono_comp _ fun _ _ => id) (⨆ i, (S i).toAddSubmonoid)
    (AddSubmonoid.coe_iSup_of_directed <| hS.mono_comp _ fun _ _ => id)
      -- Porting note `@this` doesn't work
[GOAL]
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
ι : Sort u_2
hι : Nonempty ι
S : ι → NonUnitalSubsemiring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
U : NonUnitalSubsemiring R :=
  NonUnitalSubsemiring.mk' (⋃ (i : ι), ↑(S i)) (⨆ (i : ι), toSubsemigroup (S i))
    (_ : ↑(⨆ (i : ι), toSubsemigroup (S i)) = ⋃ (i : ι), ↑(toSubsemigroup (S i))) (⨆ (i : ι), (S i).toAddSubmonoid)
    (_ : ↑(⨆ (i : ι), (S i).toAddSubmonoid) = ⋃ (i : ι), ↑(S i).toAddSubmonoid)
⊢ x ∈ ⨆ (i : ι), S i → ∃ i, x ∈ S i
[PROOFSTEP]
suffices H : ⨆ i, S i ≤ U
[GOAL]
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
ι : Sort u_2
hι : Nonempty ι
S : ι → NonUnitalSubsemiring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
U : NonUnitalSubsemiring R :=
  NonUnitalSubsemiring.mk' (⋃ (i : ι), ↑(S i)) (⨆ (i : ι), toSubsemigroup (S i))
    (_ : ↑(⨆ (i : ι), toSubsemigroup (S i)) = ⋃ (i : ι), ↑(toSubsemigroup (S i))) (⨆ (i : ι), (S i).toAddSubmonoid)
    (_ : ↑(⨆ (i : ι), (S i).toAddSubmonoid) = ⋃ (i : ι), ↑(S i).toAddSubmonoid)
H : ⨆ (i : ι), S i ≤ U
⊢ x ∈ ⨆ (i : ι), S i → ∃ i, x ∈ S i
case H
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
ι : Sort u_2
hι : Nonempty ι
S : ι → NonUnitalSubsemiring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
U : NonUnitalSubsemiring R :=
  NonUnitalSubsemiring.mk' (⋃ (i : ι), ↑(S i)) (⨆ (i : ι), toSubsemigroup (S i))
    (_ : ↑(⨆ (i : ι), toSubsemigroup (S i)) = ⋃ (i : ι), ↑(toSubsemigroup (S i))) (⨆ (i : ι), (S i).toAddSubmonoid)
    (_ : ↑(⨆ (i : ι), (S i).toAddSubmonoid) = ⋃ (i : ι), ↑(S i).toAddSubmonoid)
⊢ ⨆ (i : ι), S i ≤ U
[PROOFSTEP]
simpa using @H x
[GOAL]
case H
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
ι : Sort u_2
hι : Nonempty ι
S : ι → NonUnitalSubsemiring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
U : NonUnitalSubsemiring R :=
  NonUnitalSubsemiring.mk' (⋃ (i : ι), ↑(S i)) (⨆ (i : ι), toSubsemigroup (S i))
    (_ : ↑(⨆ (i : ι), toSubsemigroup (S i)) = ⋃ (i : ι), ↑(toSubsemigroup (S i))) (⨆ (i : ι), (S i).toAddSubmonoid)
    (_ : ↑(⨆ (i : ι), (S i).toAddSubmonoid) = ⋃ (i : ι), ↑(S i).toAddSubmonoid)
⊢ ⨆ (i : ι), S i ≤ U
[PROOFSTEP]
exact iSup_le fun i x hx => Set.mem_iUnion.2 ⟨i, hx⟩
[GOAL]
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
ι : Sort u_2
hι : Nonempty ι
S : ι → NonUnitalSubsemiring R
hS : Directed (fun x x_1 => x ≤ x_1) S
x : R
⊢ x ∈ ↑(⨆ (i : ι), S i) ↔ x ∈ ⋃ (i : ι), ↑(S i)
[PROOFSTEP]
simp [mem_iSup_of_directed hS]
[GOAL]
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
S : Set (NonUnitalSubsemiring R)
Sne : Set.Nonempty S
hS : DirectedOn (fun x x_1 => x ≤ x_1) S
x : R
⊢ x ∈ sSup S ↔ ∃ s, s ∈ S ∧ x ∈ s
[PROOFSTEP]
haveI : Nonempty S := Sne.to_subtype
[GOAL]
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
S : Set (NonUnitalSubsemiring R)
Sne : Set.Nonempty S
hS : DirectedOn (fun x x_1 => x ≤ x_1) S
x : R
this : Nonempty ↑S
⊢ x ∈ sSup S ↔ ∃ s, s ∈ S ∧ x ∈ s
[PROOFSTEP]
simp only [sSup_eq_iSup', mem_iSup_of_directed hS.directed_val, Subtype.exists, exists_prop]
[GOAL]
R : Type u
S✝ : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S✝
inst✝¹ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S✝
S : Set (NonUnitalSubsemiring R)
Sne : Set.Nonempty S
hS : DirectedOn (fun x x_1 => x ≤ x_1) S
x : R
⊢ x ∈ ↑(sSup S) ↔ x ∈ ⋃ (s : NonUnitalSubsemiring R) (_ : s ∈ S), ↑s
[PROOFSTEP]
simp [mem_sSup_of_directedOn Sne hS]
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝⁶ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝⁵ : NonUnitalNonAssocSemiring S
inst✝⁴ : NonUnitalNonAssocSemiring T
F : Type u_1
inst✝³ : NonUnitalNonAssocSemiring T
inst✝² : NonUnitalRingHomClass F R S
S' : Type u_2
inst✝¹ : SetLike S' S
inst✝ : NonUnitalSubsemiringClass S' S
s : NonUnitalSubsemiring R
f : F
⊢ ↑(srange f) = ↑⊤ ↔ Set.range ↑f = Set.univ
[PROOFSTEP]
rw [coe_srange, coe_top]
[GOAL]
R : Type u
S : Type v
T : Type w
inst✝³ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝² : NonUnitalNonAssocSemiring S
inst✝¹ : NonUnitalNonAssocSemiring T
s t : NonUnitalSubsemiring R
F : Type u_1
inst✝ : NonUnitalRingHomClass F R S
g : S → R
f : F
h : Function.LeftInverse g ↑f
src✝ : R →ₙ+* { x // x ∈ srange f } := srangeRestrict f
x : { x // x ∈ srange f }
x' : R
hx' : ↑f x' = ↑x
⊢ ↑f (g ↑x) = ↑x
[PROOFSTEP]
rw [← hx', h x']
