Metamath Proof Explorer


Theorem rabsubmgmd

Description: Deduction for proving that a restricted class abstraction is a submagma. (Contributed by AV, 26-Feb-2020)

Ref Expression
Hypotheses rabsubmgmd.b 𝐵 = ( Base ‘ 𝑀 )
rabsubmgmd.p + = ( +g𝑀 )
rabsubmgmd.m ( 𝜑𝑀 ∈ Mgm )
rabsubmgmd.cp ( ( 𝜑 ∧ ( ( 𝑥𝐵𝑦𝐵 ) ∧ ( 𝜃𝜏 ) ) ) → 𝜂 )
rabsubmgmd.th ( 𝑧 = 𝑥 → ( 𝜓𝜃 ) )
rabsubmgmd.ta ( 𝑧 = 𝑦 → ( 𝜓𝜏 ) )
rabsubmgmd.et ( 𝑧 = ( 𝑥 + 𝑦 ) → ( 𝜓𝜂 ) )
Assertion rabsubmgmd ( 𝜑 → { 𝑧𝐵𝜓 } ∈ ( SubMgm ‘ 𝑀 ) )

Proof

Step Hyp Ref Expression
1 rabsubmgmd.b 𝐵 = ( Base ‘ 𝑀 )
2 rabsubmgmd.p + = ( +g𝑀 )
3 rabsubmgmd.m ( 𝜑𝑀 ∈ Mgm )
4 rabsubmgmd.cp ( ( 𝜑 ∧ ( ( 𝑥𝐵𝑦𝐵 ) ∧ ( 𝜃𝜏 ) ) ) → 𝜂 )
5 rabsubmgmd.th ( 𝑧 = 𝑥 → ( 𝜓𝜃 ) )
6 rabsubmgmd.ta ( 𝑧 = 𝑦 → ( 𝜓𝜏 ) )
7 rabsubmgmd.et ( 𝑧 = ( 𝑥 + 𝑦 ) → ( 𝜓𝜂 ) )
8 ssrab2 { 𝑧𝐵𝜓 } ⊆ 𝐵
9 8 a1i ( 𝜑 → { 𝑧𝐵𝜓 } ⊆ 𝐵 )
10 5 elrab ( 𝑥 ∈ { 𝑧𝐵𝜓 } ↔ ( 𝑥𝐵𝜃 ) )
11 6 elrab ( 𝑦 ∈ { 𝑧𝐵𝜓 } ↔ ( 𝑦𝐵𝜏 ) )
12 10 11 anbi12i ( ( 𝑥 ∈ { 𝑧𝐵𝜓 } ∧ 𝑦 ∈ { 𝑧𝐵𝜓 } ) ↔ ( ( 𝑥𝐵𝜃 ) ∧ ( 𝑦𝐵𝜏 ) ) )
13 3 adantr ( ( 𝜑 ∧ ( ( 𝑥𝐵𝜃 ) ∧ ( 𝑦𝐵𝜏 ) ) ) → 𝑀 ∈ Mgm )
14 simprll ( ( 𝜑 ∧ ( ( 𝑥𝐵𝜃 ) ∧ ( 𝑦𝐵𝜏 ) ) ) → 𝑥𝐵 )
15 simprrl ( ( 𝜑 ∧ ( ( 𝑥𝐵𝜃 ) ∧ ( 𝑦𝐵𝜏 ) ) ) → 𝑦𝐵 )
16 1 2 mgmcl ( ( 𝑀 ∈ Mgm ∧ 𝑥𝐵𝑦𝐵 ) → ( 𝑥 + 𝑦 ) ∈ 𝐵 )
17 13 14 15 16 syl3anc ( ( 𝜑 ∧ ( ( 𝑥𝐵𝜃 ) ∧ ( 𝑦𝐵𝜏 ) ) ) → ( 𝑥 + 𝑦 ) ∈ 𝐵 )
18 simpl ( ( 𝑥𝐵𝜃 ) → 𝑥𝐵 )
19 simpl ( ( 𝑦𝐵𝜏 ) → 𝑦𝐵 )
20 18 19 anim12i ( ( ( 𝑥𝐵𝜃 ) ∧ ( 𝑦𝐵𝜏 ) ) → ( 𝑥𝐵𝑦𝐵 ) )
21 simpr ( ( 𝑥𝐵𝜃 ) → 𝜃 )
22 simpr ( ( 𝑦𝐵𝜏 ) → 𝜏 )
23 21 22 anim12i ( ( ( 𝑥𝐵𝜃 ) ∧ ( 𝑦𝐵𝜏 ) ) → ( 𝜃𝜏 ) )
24 20 23 jca ( ( ( 𝑥𝐵𝜃 ) ∧ ( 𝑦𝐵𝜏 ) ) → ( ( 𝑥𝐵𝑦𝐵 ) ∧ ( 𝜃𝜏 ) ) )
25 24 4 sylan2 ( ( 𝜑 ∧ ( ( 𝑥𝐵𝜃 ) ∧ ( 𝑦𝐵𝜏 ) ) ) → 𝜂 )
26 7 17 25 elrabd ( ( 𝜑 ∧ ( ( 𝑥𝐵𝜃 ) ∧ ( 𝑦𝐵𝜏 ) ) ) → ( 𝑥 + 𝑦 ) ∈ { 𝑧𝐵𝜓 } )
27 12 26 sylan2b ( ( 𝜑 ∧ ( 𝑥 ∈ { 𝑧𝐵𝜓 } ∧ 𝑦 ∈ { 𝑧𝐵𝜓 } ) ) → ( 𝑥 + 𝑦 ) ∈ { 𝑧𝐵𝜓 } )
28 27 ralrimivva ( 𝜑 → ∀ 𝑥 ∈ { 𝑧𝐵𝜓 } ∀ 𝑦 ∈ { 𝑧𝐵𝜓 } ( 𝑥 + 𝑦 ) ∈ { 𝑧𝐵𝜓 } )
29 1 2 issubmgm ( 𝑀 ∈ Mgm → ( { 𝑧𝐵𝜓 } ∈ ( SubMgm ‘ 𝑀 ) ↔ ( { 𝑧𝐵𝜓 } ⊆ 𝐵 ∧ ∀ 𝑥 ∈ { 𝑧𝐵𝜓 } ∀ 𝑦 ∈ { 𝑧𝐵𝜓 } ( 𝑥 + 𝑦 ) ∈ { 𝑧𝐵𝜓 } ) ) )
30 3 29 syl ( 𝜑 → ( { 𝑧𝐵𝜓 } ∈ ( SubMgm ‘ 𝑀 ) ↔ ( { 𝑧𝐵𝜓 } ⊆ 𝐵 ∧ ∀ 𝑥 ∈ { 𝑧𝐵𝜓 } ∀ 𝑦 ∈ { 𝑧𝐵𝜓 } ( 𝑥 + 𝑦 ) ∈ { 𝑧𝐵𝜓 } ) ) )
31 9 28 30 mpbir2and ( 𝜑 → { 𝑧𝐵𝜓 } ∈ ( SubMgm ‘ 𝑀 ) )