ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  resqrexlemfp1 Unicode version

Theorem resqrexlemfp1 10080
Description: Lemma for resqrex 10097. Recursion rule. This sequence is the ancient method for computing square roots, often known as the babylonian method, although known to many ancient cultures. (Contributed by Mario Carneiro and Jim Kingdon, 27-Jul-2021.)
Hypotheses
Ref Expression
resqrexlemex.seq  |-  F  =  seq 1 ( ( y  e.  RR+ ,  z  e.  RR+  |->  ( ( y  +  ( A  /  y ) )  /  2 ) ) ,  ( NN  X.  { ( 1  +  A ) } ) ,  RR+ )
resqrexlemex.a  |-  ( ph  ->  A  e.  RR )
resqrexlemex.agt0  |-  ( ph  ->  0  <_  A )
Assertion
Ref Expression
resqrexlemfp1  |-  ( (
ph  /\  N  e.  NN )  ->  ( F `
 ( N  + 
1 ) )  =  ( ( ( F `
 N )  +  ( A  /  ( F `  N )
) )  /  2
) )
Distinct variable groups:    y, A, z    ph, y, z
Allowed substitution hints:    F( y, z)    N( y, z)

Proof of Theorem resqrexlemfp1
Dummy variables  a  b  c  d are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 elnnuz 8772 . . . . . 6  |-  ( N  e.  NN  <->  N  e.  ( ZZ>= `  1 )
)
21biimpi 118 . . . . 5  |-  ( N  e.  NN  ->  N  e.  ( ZZ>= `  1 )
)
32adantl 271 . . . 4  |-  ( (
ph  /\  N  e.  NN )  ->  N  e.  ( ZZ>= `  1 )
)
4 elnnuz 8772 . . . . . 6  |-  ( a  e.  NN  <->  a  e.  ( ZZ>= `  1 )
)
5 resqrexlemex.seq . . . . . . 7  |-  F  =  seq 1 ( ( y  e.  RR+ ,  z  e.  RR+  |->  ( ( y  +  ( A  /  y ) )  /  2 ) ) ,  ( NN  X.  { ( 1  +  A ) } ) ,  RR+ )
6 resqrexlemex.a . . . . . . 7  |-  ( ph  ->  A  e.  RR )
7 resqrexlemex.agt0 . . . . . . 7  |-  ( ph  ->  0  <_  A )
85, 6, 7resqrexlem1arp 10076 . . . . . 6  |-  ( (
ph  /\  a  e.  NN )  ->  ( ( NN  X.  { ( 1  +  A ) } ) `  a
)  e.  RR+ )
94, 8sylan2br 282 . . . . 5  |-  ( (
ph  /\  a  e.  ( ZZ>= `  1 )
)  ->  ( ( NN  X.  { ( 1  +  A ) } ) `  a )  e.  RR+ )
109adantlr 461 . . . 4  |-  ( ( ( ph  /\  N  e.  NN )  /\  a  e.  ( ZZ>= `  1 )
)  ->  ( ( NN  X.  { ( 1  +  A ) } ) `  a )  e.  RR+ )
115, 6, 7resqrexlemp1rp 10077 . . . . 5  |-  ( (
ph  /\  ( a  e.  RR+  /\  b  e.  RR+ ) )  ->  (
a ( y  e.  RR+ ,  z  e.  RR+  |->  ( ( y  +  ( A  /  y
) )  /  2
) ) b )  e.  RR+ )
1211adantlr 461 . . . 4  |-  ( ( ( ph  /\  N  e.  NN )  /\  (
a  e.  RR+  /\  b  e.  RR+ ) )  -> 
( a ( y  e.  RR+ ,  z  e.  RR+  |->  ( ( y  +  ( A  / 
y ) )  / 
2 ) ) b )  e.  RR+ )
133, 10, 12iseqp1 9574 . . 3  |-  ( (
ph  /\  N  e.  NN )  ->  (  seq 1 ( ( y  e.  RR+ ,  z  e.  RR+  |->  ( ( y  +  ( A  / 
y ) )  / 
2 ) ) ,  ( NN  X.  {
( 1  +  A
) } ) , 
RR+ ) `  ( N  +  1 ) )  =  ( (  seq 1 ( ( y  e.  RR+ ,  z  e.  RR+  |->  ( ( y  +  ( A  /  y ) )  /  2 ) ) ,  ( NN  X.  { ( 1  +  A ) } ) ,  RR+ ) `  N
) ( y  e.  RR+ ,  z  e.  RR+  |->  ( ( y  +  ( A  /  y
) )  /  2
) ) ( ( NN  X.  { ( 1  +  A ) } ) `  ( N  +  1 ) ) ) )
145fveq1i 5231 . . 3  |-  ( F `
 ( N  + 
1 ) )  =  (  seq 1 ( ( y  e.  RR+ ,  z  e.  RR+  |->  ( ( y  +  ( A  /  y ) )  /  2 ) ) ,  ( NN  X.  { ( 1  +  A ) } ) ,  RR+ ) `  ( N  +  1 ) )
155fveq1i 5231 . . . 4  |-  ( F `
 N )  =  (  seq 1 ( ( y  e.  RR+ ,  z  e.  RR+  |->  ( ( y  +  ( A  /  y ) )  /  2 ) ) ,  ( NN  X.  { ( 1  +  A ) } ) ,  RR+ ) `  N
)
1615oveq1i 5574 . . 3  |-  ( ( F `  N ) ( y  e.  RR+ ,  z  e.  RR+  |->  ( ( y  +  ( A  /  y ) )  /  2 ) ) ( ( NN  X.  { ( 1  +  A ) } ) `
 ( N  + 
1 ) ) )  =  ( (  seq 1 ( ( y  e.  RR+ ,  z  e.  RR+  |->  ( ( y  +  ( A  / 
y ) )  / 
2 ) ) ,  ( NN  X.  {
( 1  +  A
) } ) , 
RR+ ) `  N
) ( y  e.  RR+ ,  z  e.  RR+  |->  ( ( y  +  ( A  /  y
) )  /  2
) ) ( ( NN  X.  { ( 1  +  A ) } ) `  ( N  +  1 ) ) )
1713, 14, 163eqtr4g 2140 . 2  |-  ( (
ph  /\  N  e.  NN )  ->  ( F `
 ( N  + 
1 ) )  =  ( ( F `  N ) ( y  e.  RR+ ,  z  e.  RR+  |->  ( ( y  +  ( A  / 
y ) )  / 
2 ) ) ( ( NN  X.  {
( 1  +  A
) } ) `  ( N  +  1
) ) ) )
18 id 19 . . . . . . 7  |-  ( y  =  c  ->  y  =  c )
19 oveq2 5572 . . . . . . 7  |-  ( y  =  c  ->  ( A  /  y )  =  ( A  /  c
) )
2018, 19oveq12d 5582 . . . . . 6  |-  ( y  =  c  ->  (
y  +  ( A  /  y ) )  =  ( c  +  ( A  /  c
) ) )
2120oveq1d 5579 . . . . 5  |-  ( y  =  c  ->  (
( y  +  ( A  /  y ) )  /  2 )  =  ( ( c  +  ( A  / 
c ) )  / 
2 ) )
22 eqidd 2084 . . . . 5  |-  ( z  =  d  ->  (
( c  +  ( A  /  c ) )  /  2 )  =  ( ( c  +  ( A  / 
c ) )  / 
2 ) )
2321, 22cbvmpt2v 5636 . . . 4  |-  ( y  e.  RR+ ,  z  e.  RR+  |->  ( ( y  +  ( A  / 
y ) )  / 
2 ) )  =  ( c  e.  RR+ ,  d  e.  RR+  |->  ( ( c  +  ( A  /  c ) )  /  2 ) )
2423a1i 9 . . 3  |-  ( (
ph  /\  N  e.  NN )  ->  ( y  e.  RR+ ,  z  e.  RR+  |->  ( ( y  +  ( A  / 
y ) )  / 
2 ) )  =  ( c  e.  RR+ ,  d  e.  RR+  |->  ( ( c  +  ( A  /  c ) )  /  2 ) ) )
25 id 19 . . . . . 6  |-  ( c  =  ( F `  N )  ->  c  =  ( F `  N ) )
26 oveq2 5572 . . . . . 6  |-  ( c  =  ( F `  N )  ->  ( A  /  c )  =  ( A  /  ( F `  N )
) )
2725, 26oveq12d 5582 . . . . 5  |-  ( c  =  ( F `  N )  ->  (
c  +  ( A  /  c ) )  =  ( ( F `
 N )  +  ( A  /  ( F `  N )
) ) )
2827oveq1d 5579 . . . 4  |-  ( c  =  ( F `  N )  ->  (
( c  +  ( A  /  c ) )  /  2 )  =  ( ( ( F `  N )  +  ( A  / 
( F `  N
) ) )  / 
2 ) )
2928ad2antrl 474 . . 3  |-  ( ( ( ph  /\  N  e.  NN )  /\  (
c  =  ( F `
 N )  /\  d  =  ( ( NN  X.  { ( 1  +  A ) } ) `  ( N  +  1 ) ) ) )  ->  (
( c  +  ( A  /  c ) )  /  2 )  =  ( ( ( F `  N )  +  ( A  / 
( F `  N
) ) )  / 
2 ) )
305, 6, 7resqrexlemf 10078 . . . 4  |-  ( ph  ->  F : NN --> RR+ )
3130ffvelrnda 5355 . . 3  |-  ( (
ph  /\  N  e.  NN )  ->  ( F `
 N )  e.  RR+ )
32 peano2nn 8154 . . . 4  |-  ( N  e.  NN  ->  ( N  +  1 )  e.  NN )
335, 6, 7resqrexlem1arp 10076 . . . 4  |-  ( (
ph  /\  ( N  +  1 )  e.  NN )  ->  (
( NN  X.  {
( 1  +  A
) } ) `  ( N  +  1
) )  e.  RR+ )
3432, 33sylan2 280 . . 3  |-  ( (
ph  /\  N  e.  NN )  ->  ( ( NN  X.  { ( 1  +  A ) } ) `  ( N  +  1 ) )  e.  RR+ )
3531rpred 8890 . . . . 5  |-  ( (
ph  /\  N  e.  NN )  ->  ( F `
 N )  e.  RR )
366adantr 270 . . . . . 6  |-  ( (
ph  /\  N  e.  NN )  ->  A  e.  RR )
3736, 31rerpdivcld 8922 . . . . 5  |-  ( (
ph  /\  N  e.  NN )  ->  ( A  /  ( F `  N ) )  e.  RR )
3835, 37readdcld 7246 . . . 4  |-  ( (
ph  /\  N  e.  NN )  ->  ( ( F `  N )  +  ( A  / 
( F `  N
) ) )  e.  RR )
3938rehalfcld 8380 . . 3  |-  ( (
ph  /\  N  e.  NN )  ->  ( ( ( F `  N
)  +  ( A  /  ( F `  N ) ) )  /  2 )  e.  RR )
4024, 29, 31, 34, 39ovmpt2d 5680 . 2  |-  ( (
ph  /\  N  e.  NN )  ->  ( ( F `  N ) ( y  e.  RR+ ,  z  e.  RR+  |->  ( ( y  +  ( A  /  y ) )  /  2 ) ) ( ( NN  X.  { ( 1  +  A ) } ) `
 ( N  + 
1 ) ) )  =  ( ( ( F `  N )  +  ( A  / 
( F `  N
) ) )  / 
2 ) )
4117, 40eqtrd 2115 1  |-  ( (
ph  /\  N  e.  NN )  ->  ( F `
 ( N  + 
1 ) )  =  ( ( ( F `
 N )  +  ( A  /  ( F `  N )
) )  /  2
) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 102    = wceq 1285    e. wcel 1434   {csn 3417   class class class wbr 3806    X. cxp 4390   ` cfv 4953  (class class class)co 5564    |-> cmpt2 5566   RRcr 7078   0cc0 7079   1c1 7080    + caddc 7082    <_ cle 7252    / cdiv 7863   NNcn 8142   2c2 8192   ZZ>=cuz 8736   RR+crp 8851    seqcseq 9557
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 577  ax-in2 578  ax-io 663  ax-5 1377  ax-7 1378  ax-gen 1379  ax-ie1 1423  ax-ie2 1424  ax-8 1436  ax-10 1437  ax-11 1438  ax-i12 1439  ax-bndl 1440  ax-4 1441  ax-13 1445  ax-14 1446  ax-17 1460  ax-i9 1464  ax-ial 1468  ax-i5r 1469  ax-ext 2065  ax-coll 3914  ax-sep 3917  ax-nul 3925  ax-pow 3969  ax-pr 3993  ax-un 4217  ax-setind 4309  ax-iinf 4358  ax-cnex 7165  ax-resscn 7166  ax-1cn 7167  ax-1re 7168  ax-icn 7169  ax-addcl 7170  ax-addrcl 7171  ax-mulcl 7172  ax-mulrcl 7173  ax-addcom 7174  ax-mulcom 7175  ax-addass 7176  ax-mulass 7177  ax-distr 7178  ax-i2m1 7179  ax-0lt1 7180  ax-1rid 7181  ax-0id 7182  ax-rnegex 7183  ax-precex 7184  ax-cnre 7185  ax-pre-ltirr 7186  ax-pre-ltwlin 7187  ax-pre-lttrn 7188  ax-pre-apti 7189  ax-pre-ltadd 7190  ax-pre-mulgt0 7191  ax-pre-mulext 7192
This theorem depends on definitions:  df-bi 115  df-3or 921  df-3an 922  df-tru 1288  df-fal 1291  df-nf 1391  df-sb 1688  df-eu 1946  df-mo 1947  df-clab 2070  df-cleq 2076  df-clel 2079  df-nfc 2212  df-ne 2250  df-nel 2345  df-ral 2358  df-rex 2359  df-reu 2360  df-rmo 2361  df-rab 2362  df-v 2612  df-sbc 2826  df-csb 2919  df-dif 2985  df-un 2987  df-in 2989  df-ss 2996  df-nul 3269  df-pw 3403  df-sn 3423  df-pr 3424  df-op 3426  df-uni 3623  df-int 3658  df-iun 3701  df-br 3807  df-opab 3861  df-mpt 3862  df-tr 3897  df-id 4077  df-po 4080  df-iso 4081  df-iord 4150  df-on 4152  df-ilim 4153  df-suc 4155  df-iom 4361  df-xp 4398  df-rel 4399  df-cnv 4400  df-co 4401  df-dm 4402  df-rn 4403  df-res 4404  df-ima 4405  df-iota 4918  df-fun 4955  df-fn 4956  df-f 4957  df-f1 4958  df-fo 4959  df-f1o 4960  df-fv 4961  df-riota 5520  df-ov 5567  df-oprab 5568  df-mpt2 5569  df-1st 5819  df-2nd 5820  df-recs 5975  df-frec 6061  df-pnf 7253  df-mnf 7254  df-xr 7255  df-ltxr 7256  df-le 7257  df-sub 7384  df-neg 7385  df-reap 7778  df-ap 7785  df-div 7864  df-inn 8143  df-2 8201  df-n0 8392  df-z 8469  df-uz 8737  df-rp 8852  df-iseq 9558
This theorem is referenced by:  resqrexlemover  10081  resqrexlemdec  10082  resqrexlemlo  10084  resqrexlemcalc1  10085
  Copyright terms: Public domain W3C validator