MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  wfrlem5 Structured version   Unicode version

Theorem wfrlem5 7052
Description: Lemma for well-founded recursion. The values of two acceptable functions agree within their domains. (Contributed by Scott Fenton, 21-Apr-2011.) (Revised by Mario Carneiro, 26-Jun-2015.)
Hypotheses
Ref Expression
wfrlem5.1  |-  R  We  A
wfrlem5.2  |-  R Se  A
wfrlem5.3  |-  B  =  { f  |  E. x ( f  Fn  x  /\  ( x 
C_  A  /\  A. y  e.  x  Pred ( R ,  A , 
y )  C_  x
)  /\  A. y  e.  x  ( f `  y )  =  ( F `  ( f  |`  Pred ( R ,  A ,  y )
) ) ) }
Assertion
Ref Expression
wfrlem5  |-  ( ( g  e.  B  /\  h  e.  B )  ->  ( ( x g u  /\  x h v )  ->  u  =  v ) )
Distinct variable groups:    A, f,
g, h, x, y   
f, F, g, h, x, y    R, f, g, h, x, y   
u, g, v, h, x
Allowed substitution hints:    A( v, u)    B( x, y, v, u, f, g, h)    R( v, u)    F( v, u)

Proof of Theorem wfrlem5
Dummy variable  a is distinct from all other variables.
StepHypRef Expression
1 vex 3083 . . . . . 6  |-  x  e. 
_V
2 vex 3083 . . . . . 6  |-  u  e. 
_V
31, 2breldm 5058 . . . . 5  |-  ( x g u  ->  x  e.  dom  g )
4 vex 3083 . . . . . 6  |-  v  e. 
_V
51, 4breldm 5058 . . . . 5  |-  ( x h v  ->  x  e.  dom  h )
63, 5anim12i 568 . . . 4  |-  ( ( x g u  /\  x h v )  ->  ( x  e. 
dom  g  /\  x  e.  dom  h ) )
7 elin 3649 . . . 4  |-  ( x  e.  ( dom  g  i^i  dom  h )  <->  ( x  e.  dom  g  /\  x  e.  dom  h ) )
86, 7sylibr 215 . . 3  |-  ( ( x g u  /\  x h v )  ->  x  e.  ( dom  g  i^i  dom  h ) )
9 anandir 836 . . . . 5  |-  ( ( ( x g u  /\  x h v )  /\  x  e.  ( dom  g  i^i 
dom  h ) )  <-> 
( ( x g u  /\  x  e.  ( dom  g  i^i 
dom  h ) )  /\  ( x h v  /\  x  e.  ( dom  g  i^i 
dom  h ) ) ) )
102brres 5130 . . . . . 6  |-  ( x ( g  |`  ( dom  g  i^i  dom  h
) ) u  <->  ( x
g u  /\  x  e.  ( dom  g  i^i 
dom  h ) ) )
114brres 5130 . . . . . 6  |-  ( x ( h  |`  ( dom  g  i^i  dom  h
) ) v  <->  ( x h v  /\  x  e.  ( dom  g  i^i 
dom  h ) ) )
1210, 11anbi12i 701 . . . . 5  |-  ( ( x ( g  |`  ( dom  g  i^i  dom  h ) ) u  /\  x ( h  |`  ( dom  g  i^i 
dom  h ) ) v )  <->  ( (
x g u  /\  x  e.  ( dom  g  i^i  dom  h )
)  /\  ( x h v  /\  x  e.  ( dom  g  i^i 
dom  h ) ) ) )
139, 12bitr4i 255 . . . 4  |-  ( ( ( x g u  /\  x h v )  /\  x  e.  ( dom  g  i^i 
dom  h ) )  <-> 
( x ( g  |`  ( dom  g  i^i 
dom  h ) ) u  /\  x ( h  |`  ( dom  g  i^i  dom  h )
) v ) )
1413biimpi 197 . . 3  |-  ( ( ( x g u  /\  x h v )  /\  x  e.  ( dom  g  i^i 
dom  h ) )  ->  ( x ( g  |`  ( dom  g  i^i  dom  h )
) u  /\  x
( h  |`  ( dom  g  i^i  dom  h
) ) v ) )
158, 14mpdan 672 . 2  |-  ( ( x g u  /\  x h v )  ->  ( x ( g  |`  ( dom  g  i^i  dom  h )
) u  /\  x
( h  |`  ( dom  g  i^i  dom  h
) ) v ) )
16 wfrlem5.3 . . . . . . . . 9  |-  B  =  { f  |  E. x ( f  Fn  x  /\  ( x 
C_  A  /\  A. y  e.  x  Pred ( R ,  A , 
y )  C_  x
)  /\  A. y  e.  x  ( f `  y )  =  ( F `  ( f  |`  Pred ( R ,  A ,  y )
) ) ) }
1716wfrlem3 7049 . . . . . . . 8  |-  ( g  e.  B  ->  dom  g  C_  A )
18 ssinss1 3690 . . . . . . . 8  |-  ( dom  g  C_  A  ->  ( dom  g  i^i  dom  h )  C_  A
)
19 wfrlem5.1 . . . . . . . . . 10  |-  R  We  A
20 wess 4840 . . . . . . . . . 10  |-  ( ( dom  g  i^i  dom  h )  C_  A  ->  ( R  We  A  ->  R  We  ( dom  g  i^i  dom  h
) ) )
2119, 20mpi 20 . . . . . . . . 9  |-  ( ( dom  g  i^i  dom  h )  C_  A  ->  R  We  ( dom  g  i^i  dom  h
) )
22 wfrlem5.2 . . . . . . . . . 10  |-  R Se  A
23 sess2 4822 . . . . . . . . . 10  |-  ( ( dom  g  i^i  dom  h )  C_  A  ->  ( R Se  A  ->  R Se  ( dom  g  i^i 
dom  h ) ) )
2422, 23mpi 20 . . . . . . . . 9  |-  ( ( dom  g  i^i  dom  h )  C_  A  ->  R Se  ( dom  g  i^i  dom  h ) )
2521, 24jca 534 . . . . . . . 8  |-  ( ( dom  g  i^i  dom  h )  C_  A  ->  ( R  We  ( dom  g  i^i  dom  h
)  /\  R Se  ( dom  g  i^i  dom  h
) ) )
2617, 18, 253syl 18 . . . . . . 7  |-  ( g  e.  B  ->  ( R  We  ( dom  g  i^i  dom  h )  /\  R Se  ( dom  g  i^i  dom  h )
) )
2726adantr 466 . . . . . 6  |-  ( ( g  e.  B  /\  h  e.  B )  ->  ( R  We  ( dom  g  i^i  dom  h
)  /\  R Se  ( dom  g  i^i  dom  h
) ) )
2819, 16wfrlem4 7051 . . . . . 6  |-  ( ( g  e.  B  /\  h  e.  B )  ->  ( ( g  |`  ( dom  g  i^i  dom  h ) )  Fn  ( dom  g  i^i 
dom  h )  /\  A. a  e.  ( dom  g  i^i  dom  h
) ( ( g  |`  ( dom  g  i^i 
dom  h ) ) `
 a )  =  ( F `  (
( g  |`  ( dom  g  i^i  dom  h
) )  |`  Pred ( R ,  ( dom  g  i^i  dom  h ) ,  a ) ) ) ) )
2919, 16wfrlem4 7051 . . . . . . . 8  |-  ( ( h  e.  B  /\  g  e.  B )  ->  ( ( h  |`  ( dom  h  i^i  dom  g ) )  Fn  ( dom  h  i^i 
dom  g )  /\  A. a  e.  ( dom  h  i^i  dom  g
) ( ( h  |`  ( dom  h  i^i 
dom  g ) ) `
 a )  =  ( F `  (
( h  |`  ( dom  h  i^i  dom  g
) )  |`  Pred ( R ,  ( dom  h  i^i  dom  g ) ,  a ) ) ) ) )
3029ancoms 454 . . . . . . 7  |-  ( ( g  e.  B  /\  h  e.  B )  ->  ( ( h  |`  ( dom  h  i^i  dom  g ) )  Fn  ( dom  h  i^i 
dom  g )  /\  A. a  e.  ( dom  h  i^i  dom  g
) ( ( h  |`  ( dom  h  i^i 
dom  g ) ) `
 a )  =  ( F `  (
( h  |`  ( dom  h  i^i  dom  g
) )  |`  Pred ( R ,  ( dom  h  i^i  dom  g ) ,  a ) ) ) ) )
31 incom 3655 . . . . . . . . . . 11  |-  ( dom  g  i^i  dom  h
)  =  ( dom  h  i^i  dom  g
)
3231reseq2i 5121 . . . . . . . . . 10  |-  ( h  |`  ( dom  g  i^i 
dom  h ) )  =  ( h  |`  ( dom  h  i^i  dom  g ) )
3332fneq1i 5688 . . . . . . . . 9  |-  ( ( h  |`  ( dom  g  i^i  dom  h )
)  Fn  ( dom  g  i^i  dom  h
)  <->  ( h  |`  ( dom  h  i^i  dom  g ) )  Fn  ( dom  g  i^i 
dom  h ) )
3431fneq2i 5689 . . . . . . . . 9  |-  ( ( h  |`  ( dom  h  i^i  dom  g )
)  Fn  ( dom  g  i^i  dom  h
)  <->  ( h  |`  ( dom  h  i^i  dom  g ) )  Fn  ( dom  h  i^i 
dom  g ) )
3533, 34bitri 252 . . . . . . . 8  |-  ( ( h  |`  ( dom  g  i^i  dom  h )
)  Fn  ( dom  g  i^i  dom  h
)  <->  ( h  |`  ( dom  h  i^i  dom  g ) )  Fn  ( dom  h  i^i 
dom  g ) )
3632fveq1i 5883 . . . . . . . . . 10  |-  ( ( h  |`  ( dom  g  i^i  dom  h )
) `  a )  =  ( ( h  |`  ( dom  h  i^i 
dom  g ) ) `
 a )
37 predeq2 5402 . . . . . . . . . . . . 13  |-  ( ( dom  g  i^i  dom  h )  =  ( dom  h  i^i  dom  g )  ->  Pred ( R ,  ( dom  g  i^i  dom  h ) ,  a )  = 
Pred ( R , 
( dom  h  i^i  dom  g ) ,  a ) )
3831, 37ax-mp 5 . . . . . . . . . . . 12  |-  Pred ( R ,  ( dom  g  i^i  dom  h ) ,  a )  = 
Pred ( R , 
( dom  h  i^i  dom  g ) ,  a )
3932, 38reseq12i 5122 . . . . . . . . . . 11  |-  ( ( h  |`  ( dom  g  i^i  dom  h )
)  |`  Pred ( R , 
( dom  g  i^i  dom  h ) ,  a ) )  =  ( ( h  |`  ( dom  h  i^i  dom  g
) )  |`  Pred ( R ,  ( dom  h  i^i  dom  g ) ,  a ) )
4039fveq2i 5885 . . . . . . . . . 10  |-  ( F `
 ( ( h  |`  ( dom  g  i^i 
dom  h ) )  |`  Pred ( R , 
( dom  g  i^i  dom  h ) ,  a ) ) )  =  ( F `  (
( h  |`  ( dom  h  i^i  dom  g
) )  |`  Pred ( R ,  ( dom  h  i^i  dom  g ) ,  a ) ) )
4136, 40eqeq12i 2442 . . . . . . . . 9  |-  ( ( ( h  |`  ( dom  g  i^i  dom  h
) ) `  a
)  =  ( F `
 ( ( h  |`  ( dom  g  i^i 
dom  h ) )  |`  Pred ( R , 
( dom  g  i^i  dom  h ) ,  a ) ) )  <->  ( (
h  |`  ( dom  h  i^i  dom  g ) ) `
 a )  =  ( F `  (
( h  |`  ( dom  h  i^i  dom  g
) )  |`  Pred ( R ,  ( dom  h  i^i  dom  g ) ,  a ) ) ) )
4231, 41raleqbii 2867 . . . . . . . 8  |-  ( A. a  e.  ( dom  g  i^i  dom  h )
( ( h  |`  ( dom  g  i^i  dom  h ) ) `  a )  =  ( F `  ( ( h  |`  ( dom  g  i^i  dom  h )
)  |`  Pred ( R , 
( dom  g  i^i  dom  h ) ,  a ) ) )  <->  A. a  e.  ( dom  h  i^i 
dom  g ) ( ( h  |`  ( dom  h  i^i  dom  g
) ) `  a
)  =  ( F `
 ( ( h  |`  ( dom  h  i^i 
dom  g ) )  |`  Pred ( R , 
( dom  h  i^i  dom  g ) ,  a ) ) ) )
4335, 42anbi12i 701 . . . . . . 7  |-  ( ( ( h  |`  ( dom  g  i^i  dom  h
) )  Fn  ( dom  g  i^i  dom  h
)  /\  A. a  e.  ( dom  g  i^i 
dom  h ) ( ( h  |`  ( dom  g  i^i  dom  h
) ) `  a
)  =  ( F `
 ( ( h  |`  ( dom  g  i^i 
dom  h ) )  |`  Pred ( R , 
( dom  g  i^i  dom  h ) ,  a ) ) ) )  <-> 
( ( h  |`  ( dom  h  i^i  dom  g ) )  Fn  ( dom  h  i^i 
dom  g )  /\  A. a  e.  ( dom  h  i^i  dom  g
) ( ( h  |`  ( dom  h  i^i 
dom  g ) ) `
 a )  =  ( F `  (
( h  |`  ( dom  h  i^i  dom  g
) )  |`  Pred ( R ,  ( dom  h  i^i  dom  g ) ,  a ) ) ) ) )
4430, 43sylibr 215 . . . . . 6  |-  ( ( g  e.  B  /\  h  e.  B )  ->  ( ( h  |`  ( dom  g  i^i  dom  h ) )  Fn  ( dom  g  i^i 
dom  h )  /\  A. a  e.  ( dom  g  i^i  dom  h
) ( ( h  |`  ( dom  g  i^i 
dom  h ) ) `
 a )  =  ( F `  (
( h  |`  ( dom  g  i^i  dom  h
) )  |`  Pred ( R ,  ( dom  g  i^i  dom  h ) ,  a ) ) ) ) )
45 wfr3g 7046 . . . . . 6  |-  ( ( ( R  We  ( dom  g  i^i  dom  h
)  /\  R Se  ( dom  g  i^i  dom  h
) )  /\  (
( g  |`  ( dom  g  i^i  dom  h
) )  Fn  ( dom  g  i^i  dom  h
)  /\  A. a  e.  ( dom  g  i^i 
dom  h ) ( ( g  |`  ( dom  g  i^i  dom  h
) ) `  a
)  =  ( F `
 ( ( g  |`  ( dom  g  i^i 
dom  h ) )  |`  Pred ( R , 
( dom  g  i^i  dom  h ) ,  a ) ) ) )  /\  ( ( h  |`  ( dom  g  i^i 
dom  h ) )  Fn  ( dom  g  i^i  dom  h )  /\  A. a  e.  ( dom  g  i^i  dom  h
) ( ( h  |`  ( dom  g  i^i 
dom  h ) ) `
 a )  =  ( F `  (
( h  |`  ( dom  g  i^i  dom  h
) )  |`  Pred ( R ,  ( dom  g  i^i  dom  h ) ,  a ) ) ) ) )  -> 
( g  |`  ( dom  g  i^i  dom  h
) )  =  ( h  |`  ( dom  g  i^i  dom  h )
) )
4627, 28, 44, 45syl3anc 1264 . . . . 5  |-  ( ( g  e.  B  /\  h  e.  B )  ->  ( g  |`  ( dom  g  i^i  dom  h
) )  =  ( h  |`  ( dom  g  i^i  dom  h )
) )
4746breqd 4434 . . . 4  |-  ( ( g  e.  B  /\  h  e.  B )  ->  ( x ( g  |`  ( dom  g  i^i 
dom  h ) ) v  <->  x ( h  |`  ( dom  g  i^i 
dom  h ) ) v ) )
4847biimprd 226 . . 3  |-  ( ( g  e.  B  /\  h  e.  B )  ->  ( x ( h  |`  ( dom  g  i^i 
dom  h ) ) v  ->  x (
g  |`  ( dom  g  i^i  dom  h ) ) v ) )
4916wfrlem2 7048 . . . . 5  |-  ( g  e.  B  ->  Fun  g )
50 funres 5640 . . . . 5  |-  ( Fun  g  ->  Fun  ( g  |`  ( dom  g  i^i 
dom  h ) ) )
51 dffun2 5611 . . . . . 6  |-  ( Fun  ( g  |`  ( dom  g  i^i  dom  h
) )  <->  ( Rel  ( g  |`  ( dom  g  i^i  dom  h
) )  /\  A. x A. u A. v
( ( x ( g  |`  ( dom  g  i^i  dom  h )
) u  /\  x
( g  |`  ( dom  g  i^i  dom  h
) ) v )  ->  u  =  v ) ) )
5251simprbi 465 . . . . 5  |-  ( Fun  ( g  |`  ( dom  g  i^i  dom  h
) )  ->  A. x A. u A. v ( ( x ( g  |`  ( dom  g  i^i 
dom  h ) ) u  /\  x ( g  |`  ( dom  g  i^i  dom  h )
) v )  ->  u  =  v )
)
53 2sp 1921 . . . . . 6  |-  ( A. u A. v ( ( x ( g  |`  ( dom  g  i^i  dom  h ) ) u  /\  x ( g  |`  ( dom  g  i^i 
dom  h ) ) v )  ->  u  =  v )  -> 
( ( x ( g  |`  ( dom  g  i^i  dom  h )
) u  /\  x
( g  |`  ( dom  g  i^i  dom  h
) ) v )  ->  u  =  v ) )
5453sps 1920 . . . . 5  |-  ( A. x A. u A. v
( ( x ( g  |`  ( dom  g  i^i  dom  h )
) u  /\  x
( g  |`  ( dom  g  i^i  dom  h
) ) v )  ->  u  =  v )  ->  ( (
x ( g  |`  ( dom  g  i^i  dom  h ) ) u  /\  x ( g  |`  ( dom  g  i^i 
dom  h ) ) v )  ->  u  =  v ) )
5549, 50, 52, 544syl 19 . . . 4  |-  ( g  e.  B  ->  (
( x ( g  |`  ( dom  g  i^i 
dom  h ) ) u  /\  x ( g  |`  ( dom  g  i^i  dom  h )
) v )  ->  u  =  v )
)
5655adantr 466 . . 3  |-  ( ( g  e.  B  /\  h  e.  B )  ->  ( ( x ( g  |`  ( dom  g  i^i  dom  h )
) u  /\  x
( g  |`  ( dom  g  i^i  dom  h
) ) v )  ->  u  =  v ) )
5748, 56sylan2d 484 . 2  |-  ( ( g  e.  B  /\  h  e.  B )  ->  ( ( x ( g  |`  ( dom  g  i^i  dom  h )
) u  /\  x
( h  |`  ( dom  g  i^i  dom  h
) ) v )  ->  u  =  v ) )
5815, 57syl5 33 1  |-  ( ( g  e.  B  /\  h  e.  B )  ->  ( ( x g u  /\  x h v )  ->  u  =  v ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 370    /\ w3a 982   A.wal 1435    = wceq 1437   E.wex 1657    e. wcel 1872   {cab 2407   A.wral 2771    i^i cin 3435    C_ wss 3436   class class class wbr 4423   Se wse 4810    We wwe 4811   dom cdm 4853    |` cres 4855   Rel wrel 4858   Predcpred 5398   Fun wfun 5595    Fn wfn 5596   ` cfv 5601
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1663  ax-4 1676  ax-5 1752  ax-6 1798  ax-7 1843  ax-8 1874  ax-9 1876  ax-10 1891  ax-11 1896  ax-12 1909  ax-13 2057  ax-ext 2401  ax-sep 4546  ax-nul 4555  ax-pow 4602  ax-pr 4660
This theorem depends on definitions:  df-bi 188  df-or 371  df-an 372  df-3or 983  df-3an 984  df-tru 1440  df-ex 1658  df-nf 1662  df-sb 1791  df-eu 2273  df-mo 2274  df-clab 2408  df-cleq 2414  df-clel 2417  df-nfc 2568  df-ne 2616  df-ral 2776  df-rex 2777  df-reu 2778  df-rmo 2779  df-rab 2780  df-v 3082  df-sbc 3300  df-csb 3396  df-dif 3439  df-un 3441  df-in 3443  df-ss 3450  df-nul 3762  df-if 3912  df-sn 3999  df-pr 4001  df-op 4005  df-uni 4220  df-br 4424  df-opab 4483  df-mpt 4484  df-id 4768  df-po 4774  df-so 4775  df-fr 4812  df-se 4813  df-we 4814  df-xp 4859  df-rel 4860  df-cnv 4861  df-co 4862  df-dm 4863  df-rn 4864  df-res 4865  df-ima 4866  df-pred 5399  df-iota 5565  df-fun 5603  df-fn 5604  df-fv 5609
This theorem is referenced by:  wfrfun  7058
  Copyright terms: Public domain W3C validator