Metamath Proof Explorer


Theorem frmdsssubm

Description: The set of words taking values in a subset is a (free) submonoid of the free monoid. (Contributed by Mario Carneiro, 27-Sep-2015) (Revised by Mario Carneiro, 27-Feb-2016)

Ref Expression
Hypothesis frmdmnd.m M = freeMnd I
Assertion frmdsssubm I V J I Word J SubMnd M

Proof

Step Hyp Ref Expression
1 frmdmnd.m M = freeMnd I
2 sswrd J I Word J Word I
3 2 adantl I V J I Word J Word I
4 eqid Base M = Base M
5 1 4 frmdbas I V Base M = Word I
6 5 adantr I V J I Base M = Word I
7 3 6 sseqtrrd I V J I Word J Base M
8 wrd0 Word J
9 8 a1i I V J I Word J
10 7 sselda I V J I x Word J x Base M
11 7 sselda I V J I y Word J y Base M
12 10 11 anim12dan I V J I x Word J y Word J x Base M y Base M
13 eqid + M = + M
14 1 4 13 frmdadd x Base M y Base M x + M y = x ++ y
15 12 14 syl I V J I x Word J y Word J x + M y = x ++ y
16 ccatcl x Word J y Word J x ++ y Word J
17 16 adantl I V J I x Word J y Word J x ++ y Word J
18 15 17 eqeltrd I V J I x Word J y Word J x + M y Word J
19 18 ralrimivva I V J I x Word J y Word J x + M y Word J
20 1 frmdmnd I V M Mnd
21 20 adantr I V J I M Mnd
22 1 frmd0 = 0 M
23 4 22 13 issubm M Mnd Word J SubMnd M Word J Base M Word J x Word J y Word J x + M y Word J
24 21 23 syl I V J I Word J SubMnd M Word J Base M Word J x Word J y Word J x + M y Word J
25 7 9 19 24 mpbir3and I V J I Word J SubMnd M