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

Theorem isumsplit 10881
Description: Split off the first  N terms of an infinite sum. (Contributed by Paul Chapman, 9-Feb-2008.) (Revised by Jim Kingdon, 21-Oct-2022.)
Hypotheses
Ref Expression
isumsplit.1  |-  Z  =  ( ZZ>= `  M )
isumsplit.2  |-  W  =  ( ZZ>= `  N )
isumsplit.3  |-  ( ph  ->  N  e.  Z )
isumsplit.4  |-  ( (
ph  /\  k  e.  Z )  ->  ( F `  k )  =  A )
isumsplit.5  |-  ( (
ph  /\  k  e.  Z )  ->  A  e.  CC )
isumsplit.6  |-  ( ph  ->  seq M (  +  ,  F )  e. 
dom 
~~>  )
Assertion
Ref Expression
isumsplit  |-  ( ph  -> 
sum_ k  e.  Z  A  =  ( sum_ k  e.  ( M ... ( N  -  1 ) ) A  +  sum_ k  e.  W  A
) )
Distinct variable groups:    k, F    k, M    ph, k    k, Z   
k, N    k, W
Allowed substitution hint:    A( k)

Proof of Theorem isumsplit
Dummy variables  j  m  x are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 isumsplit.1 . 2  |-  Z  =  ( ZZ>= `  M )
2 isumsplit.3 . . . 4  |-  ( ph  ->  N  e.  Z )
32, 1syl6eleq 2180 . . 3  |-  ( ph  ->  N  e.  ( ZZ>= `  M ) )
4 eluzel2 9022 . . 3  |-  ( N  e.  ( ZZ>= `  M
)  ->  M  e.  ZZ )
53, 4syl 14 . 2  |-  ( ph  ->  M  e.  ZZ )
6 isumsplit.4 . 2  |-  ( (
ph  /\  k  e.  Z )  ->  ( F `  k )  =  A )
7 isumsplit.5 . 2  |-  ( (
ph  /\  k  e.  Z )  ->  A  e.  CC )
8 isumsplit.2 . . 3  |-  W  =  ( ZZ>= `  N )
9 eluzelz 9026 . . . 4  |-  ( N  e.  ( ZZ>= `  M
)  ->  N  e.  ZZ )
103, 9syl 14 . . 3  |-  ( ph  ->  N  e.  ZZ )
11 uzss 9037 . . . . . . . 8  |-  ( N  e.  ( ZZ>= `  M
)  ->  ( ZZ>= `  N )  C_  ( ZZ>=
`  M ) )
123, 11syl 14 . . . . . . 7  |-  ( ph  ->  ( ZZ>= `  N )  C_  ( ZZ>= `  M )
)
1312, 8, 13sstr4g 3067 . . . . . 6  |-  ( ph  ->  W  C_  Z )
1413sselda 3025 . . . . 5  |-  ( (
ph  /\  k  e.  W )  ->  k  e.  Z )
1514, 6syldan 276 . . . 4  |-  ( (
ph  /\  k  e.  W )  ->  ( F `  k )  =  A )
1614, 7syldan 276 . . . 4  |-  ( (
ph  /\  k  e.  W )  ->  A  e.  CC )
17 isumsplit.6 . . . . 5  |-  ( ph  ->  seq M (  +  ,  F )  e. 
dom 
~~>  )
186, 7eqeltrd 2164 . . . . . 6  |-  ( (
ph  /\  k  e.  Z )  ->  ( F `  k )  e.  CC )
191, 2, 18iserex 10723 . . . . 5  |-  ( ph  ->  (  seq M (  +  ,  F )  e.  dom  ~~>  <->  seq N (  +  ,  F )  e.  dom  ~~>  ) )
2017, 19mpbid 145 . . . 4  |-  ( ph  ->  seq N (  +  ,  F )  e. 
dom 
~~>  )
218, 10, 15, 16, 20isumclim2 10812 . . 3  |-  ( ph  ->  seq N (  +  ,  F )  ~~>  sum_ k  e.  W  A )
22 peano2zm 8786 . . . . . 6  |-  ( N  e.  ZZ  ->  ( N  -  1 )  e.  ZZ )
2310, 22syl 14 . . . . 5  |-  ( ph  ->  ( N  -  1 )  e.  ZZ )
245, 23fzfigd 9834 . . . 4  |-  ( ph  ->  ( M ... ( N  -  1 ) )  e.  Fin )
25 elfzuz 9434 . . . . . 6  |-  ( k  e.  ( M ... ( N  -  1
) )  ->  k  e.  ( ZZ>= `  M )
)
2625, 1syl6eleqr 2181 . . . . 5  |-  ( k  e.  ( M ... ( N  -  1
) )  ->  k  e.  Z )
2726, 7sylan2 280 . . . 4  |-  ( (
ph  /\  k  e.  ( M ... ( N  -  1 ) ) )  ->  A  e.  CC )
2824, 27fsumcl 10790 . . 3  |-  ( ph  -> 
sum_ k  e.  ( M ... ( N  -  1 ) ) A  e.  CC )
2914, 18syldan 276 . . . . 5  |-  ( (
ph  /\  k  e.  W )  ->  ( F `  k )  e.  CC )
308, 10, 29serf 9896 . . . 4  |-  ( ph  ->  seq N (  +  ,  F ) : W --> CC )
3130ffvelrnda 5434 . . 3  |-  ( (
ph  /\  j  e.  W )  ->  (  seq N (  +  ,  F ) `  j
)  e.  CC )
325zred 8866 . . . . . . . . . . . 12  |-  ( ph  ->  M  e.  RR )
3332ltm1d 8391 . . . . . . . . . . 11  |-  ( ph  ->  ( M  -  1 )  <  M )
34 peano2zm 8786 . . . . . . . . . . . . 13  |-  ( M  e.  ZZ  ->  ( M  -  1 )  e.  ZZ )
355, 34syl 14 . . . . . . . . . . . 12  |-  ( ph  ->  ( M  -  1 )  e.  ZZ )
36 fzn 9454 . . . . . . . . . . . 12  |-  ( ( M  e.  ZZ  /\  ( M  -  1
)  e.  ZZ )  ->  ( ( M  -  1 )  < 
M  <->  ( M ... ( M  -  1
) )  =  (/) ) )
375, 35, 36syl2anc 403 . . . . . . . . . . 11  |-  ( ph  ->  ( ( M  - 
1 )  <  M  <->  ( M ... ( M  -  1 ) )  =  (/) ) )
3833, 37mpbid 145 . . . . . . . . . 10  |-  ( ph  ->  ( M ... ( M  -  1 ) )  =  (/) )
3938sumeq1d 10751 . . . . . . . . 9  |-  ( ph  -> 
sum_ k  e.  ( M ... ( M  -  1 ) ) A  =  sum_ k  e.  (/)  A )
4039adantr 270 . . . . . . . 8  |-  ( (
ph  /\  j  e.  W )  ->  sum_ k  e.  ( M ... ( M  -  1 ) ) A  =  sum_ k  e.  (/)  A )
41 sum0 10776 . . . . . . . 8  |-  sum_ k  e.  (/)  A  =  0
4240, 41syl6eq 2136 . . . . . . 7  |-  ( (
ph  /\  j  e.  W )  ->  sum_ k  e.  ( M ... ( M  -  1 ) ) A  =  0 )
4342oveq1d 5667 . . . . . 6  |-  ( (
ph  /\  j  e.  W )  ->  ( sum_ k  e.  ( M ... ( M  - 
1 ) ) A  +  (  seq M
(  +  ,  F
) `  j )
)  =  ( 0  +  (  seq M
(  +  ,  F
) `  j )
) )
4413sselda 3025 . . . . . . . 8  |-  ( (
ph  /\  j  e.  W )  ->  j  e.  Z )
451, 5, 18serf 9896 . . . . . . . . 9  |-  ( ph  ->  seq M (  +  ,  F ) : Z --> CC )
4645ffvelrnda 5434 . . . . . . . 8  |-  ( (
ph  /\  j  e.  Z )  ->  (  seq M (  +  ,  F ) `  j
)  e.  CC )
4744, 46syldan 276 . . . . . . 7  |-  ( (
ph  /\  j  e.  W )  ->  (  seq M (  +  ,  F ) `  j
)  e.  CC )
4847addid2d 7630 . . . . . 6  |-  ( (
ph  /\  j  e.  W )  ->  (
0  +  (  seq M (  +  ,  F ) `  j
) )  =  (  seq M (  +  ,  F ) `  j ) )
4943, 48eqtr2d 2121 . . . . 5  |-  ( (
ph  /\  j  e.  W )  ->  (  seq M (  +  ,  F ) `  j
)  =  ( sum_ k  e.  ( M ... ( M  -  1 ) ) A  +  (  seq M (  +  ,  F ) `  j ) ) )
50 oveq1 5659 . . . . . . . . 9  |-  ( N  =  M  ->  ( N  -  1 )  =  ( M  - 
1 ) )
5150oveq2d 5668 . . . . . . . 8  |-  ( N  =  M  ->  ( M ... ( N  - 
1 ) )  =  ( M ... ( M  -  1 ) ) )
5251sumeq1d 10751 . . . . . . 7  |-  ( N  =  M  ->  sum_ k  e.  ( M ... ( N  -  1 ) ) A  =  sum_ k  e.  ( M ... ( M  -  1 ) ) A )
53 seqeq1 9857 . . . . . . . 8  |-  ( N  =  M  ->  seq N (  +  ,  F )  =  seq M (  +  ,  F ) )
5453fveq1d 5307 . . . . . . 7  |-  ( N  =  M  ->  (  seq N (  +  ,  F ) `  j
)  =  (  seq M (  +  ,  F ) `  j
) )
5552, 54oveq12d 5670 . . . . . 6  |-  ( N  =  M  ->  ( sum_ k  e.  ( M ... ( N  - 
1 ) ) A  +  (  seq N
(  +  ,  F
) `  j )
)  =  ( sum_ k  e.  ( M ... ( M  -  1 ) ) A  +  (  seq M (  +  ,  F ) `  j ) ) )
5655eqeq2d 2099 . . . . 5  |-  ( N  =  M  ->  (
(  seq M (  +  ,  F ) `  j )  =  (
sum_ k  e.  ( M ... ( N  -  1 ) ) A  +  (  seq N (  +  ,  F ) `  j
) )  <->  (  seq M (  +  ,  F ) `  j
)  =  ( sum_ k  e.  ( M ... ( M  -  1 ) ) A  +  (  seq M (  +  ,  F ) `  j ) ) ) )
5749, 56syl5ibrcom 155 . . . 4  |-  ( (
ph  /\  j  e.  W )  ->  ( N  =  M  ->  (  seq M (  +  ,  F ) `  j )  =  (
sum_ k  e.  ( M ... ( N  -  1 ) ) A  +  (  seq N (  +  ,  F ) `  j
) ) ) )
58 addcl 7465 . . . . . . . 8  |-  ( ( k  e.  CC  /\  m  e.  CC )  ->  ( k  +  m
)  e.  CC )
5958adantl 271 . . . . . . 7  |-  ( ( ( ( ph  /\  j  e.  W )  /\  N  e.  ( ZZ>=
`  ( M  + 
1 ) ) )  /\  ( k  e.  CC  /\  m  e.  CC ) )  -> 
( k  +  m
)  e.  CC )
60 addass 7470 . . . . . . . 8  |-  ( ( k  e.  CC  /\  m  e.  CC  /\  x  e.  CC )  ->  (
( k  +  m
)  +  x )  =  ( k  +  ( m  +  x
) ) )
6160adantl 271 . . . . . . 7  |-  ( ( ( ( ph  /\  j  e.  W )  /\  N  e.  ( ZZ>=
`  ( M  + 
1 ) ) )  /\  ( k  e.  CC  /\  m  e.  CC  /\  x  e.  CC ) )  -> 
( ( k  +  m )  +  x
)  =  ( k  +  ( m  +  x ) ) )
62 simplr 497 . . . . . . . 8  |-  ( ( ( ph  /\  j  e.  W )  /\  N  e.  ( ZZ>= `  ( M  +  1 ) ) )  ->  j  e.  W )
63 simpll 496 . . . . . . . . . . 11  |-  ( ( ( ph  /\  j  e.  W )  /\  N  e.  ( ZZ>= `  ( M  +  1 ) ) )  ->  ph )
6410zcnd 8867 . . . . . . . . . . . . 13  |-  ( ph  ->  N  e.  CC )
65 ax-1cn 7436 . . . . . . . . . . . . 13  |-  1  e.  CC
66 npcan 7689 . . . . . . . . . . . . 13  |-  ( ( N  e.  CC  /\  1  e.  CC )  ->  ( ( N  - 
1 )  +  1 )  =  N )
6764, 65, 66sylancl 404 . . . . . . . . . . . 12  |-  ( ph  ->  ( ( N  - 
1 )  +  1 )  =  N )
6867eqcomd 2093 . . . . . . . . . . 11  |-  ( ph  ->  N  =  ( ( N  -  1 )  +  1 ) )
6963, 68syl 14 . . . . . . . . . 10  |-  ( ( ( ph  /\  j  e.  W )  /\  N  e.  ( ZZ>= `  ( M  +  1 ) ) )  ->  N  =  ( ( N  - 
1 )  +  1 ) )
7069fveq2d 5309 . . . . . . . . 9  |-  ( ( ( ph  /\  j  e.  W )  /\  N  e.  ( ZZ>= `  ( M  +  1 ) ) )  ->  ( ZZ>= `  N )  =  (
ZZ>= `  ( ( N  -  1 )  +  1 ) ) )
718, 70syl5eq 2132 . . . . . . . 8  |-  ( ( ( ph  /\  j  e.  W )  /\  N  e.  ( ZZ>= `  ( M  +  1 ) ) )  ->  W  =  ( ZZ>= `  ( ( N  -  1 )  +  1 ) ) )
7262, 71eleqtrd 2166 . . . . . . 7  |-  ( ( ( ph  /\  j  e.  W )  /\  N  e.  ( ZZ>= `  ( M  +  1 ) ) )  ->  j  e.  ( ZZ>= `  ( ( N  -  1 )  +  1 ) ) )
735adantr 270 . . . . . . . 8  |-  ( (
ph  /\  j  e.  W )  ->  M  e.  ZZ )
74 eluzp1m1 9040 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  ( ZZ>= `  ( M  +  1
) ) )  -> 
( N  -  1 )  e.  ( ZZ>= `  M ) )
7573, 74sylan 277 . . . . . . 7  |-  ( ( ( ph  /\  j  e.  W )  /\  N  e.  ( ZZ>= `  ( M  +  1 ) ) )  ->  ( N  -  1 )  e.  ( ZZ>= `  M )
)
761eleq2i 2154 . . . . . . . . . 10  |-  ( k  e.  Z  <->  k  e.  ( ZZ>= `  M )
)
7776, 6sylan2br 282 . . . . . . . . 9  |-  ( (
ph  /\  k  e.  ( ZZ>= `  M )
)  ->  ( F `  k )  =  A )
7863, 77sylan 277 . . . . . . . 8  |-  ( ( ( ( ph  /\  j  e.  W )  /\  N  e.  ( ZZ>=
`  ( M  + 
1 ) ) )  /\  k  e.  (
ZZ>= `  M ) )  ->  ( F `  k )  =  A )
7976, 7sylan2br 282 . . . . . . . . 9  |-  ( (
ph  /\  k  e.  ( ZZ>= `  M )
)  ->  A  e.  CC )
8063, 79sylan 277 . . . . . . . 8  |-  ( ( ( ( ph  /\  j  e.  W )  /\  N  e.  ( ZZ>=
`  ( M  + 
1 ) ) )  /\  k  e.  (
ZZ>= `  M ) )  ->  A  e.  CC )
8178, 80eqeltrd 2164 . . . . . . 7  |-  ( ( ( ( ph  /\  j  e.  W )  /\  N  e.  ( ZZ>=
`  ( M  + 
1 ) ) )  /\  k  e.  (
ZZ>= `  M ) )  ->  ( F `  k )  e.  CC )
8259, 61, 72, 75, 81seq3split 9903 . . . . . 6  |-  ( ( ( ph  /\  j  e.  W )  /\  N  e.  ( ZZ>= `  ( M  +  1 ) ) )  ->  (  seq M (  +  ,  F ) `  j
)  =  ( (  seq M (  +  ,  F ) `  ( N  -  1
) )  +  (  seq ( ( N  -  1 )  +  1 ) (  +  ,  F ) `  j ) ) )
8378, 75, 80fsum3ser 10787 . . . . . . 7  |-  ( ( ( ph  /\  j  e.  W )  /\  N  e.  ( ZZ>= `  ( M  +  1 ) ) )  ->  sum_ k  e.  ( M ... ( N  -  1 ) ) A  =  (  seq M (  +  ,  F ) `  ( N  -  1
) ) )
8469seqeq1d 9860 . . . . . . . 8  |-  ( ( ( ph  /\  j  e.  W )  /\  N  e.  ( ZZ>= `  ( M  +  1 ) ) )  ->  seq N (  +  ,  F )  =  seq ( ( N  -  1 )  +  1 ) (  +  ,  F ) )
8584fveq1d 5307 . . . . . . 7  |-  ( ( ( ph  /\  j  e.  W )  /\  N  e.  ( ZZ>= `  ( M  +  1 ) ) )  ->  (  seq N (  +  ,  F ) `  j
)  =  (  seq ( ( N  - 
1 )  +  1 ) (  +  ,  F ) `  j
) )
8683, 85oveq12d 5670 . . . . . 6  |-  ( ( ( ph  /\  j  e.  W )  /\  N  e.  ( ZZ>= `  ( M  +  1 ) ) )  ->  ( sum_ k  e.  ( M ... ( N  -  1 ) ) A  +  (  seq N (  +  ,  F ) `  j ) )  =  ( (  seq M
(  +  ,  F
) `  ( N  -  1 ) )  +  (  seq (
( N  -  1 )  +  1 ) (  +  ,  F
) `  j )
) )
8782, 86eqtr4d 2123 . . . . 5  |-  ( ( ( ph  /\  j  e.  W )  /\  N  e.  ( ZZ>= `  ( M  +  1 ) ) )  ->  (  seq M (  +  ,  F ) `  j
)  =  ( sum_ k  e.  ( M ... ( N  -  1 ) ) A  +  (  seq N (  +  ,  F ) `  j ) ) )
8887ex 113 . . . 4  |-  ( (
ph  /\  j  e.  W )  ->  ( N  e.  ( ZZ>= `  ( M  +  1
) )  ->  (  seq M (  +  ,  F ) `  j
)  =  ( sum_ k  e.  ( M ... ( N  -  1 ) ) A  +  (  seq N (  +  ,  F ) `  j ) ) ) )
89 uzp1 9050 . . . . . 6  |-  ( N  e.  ( ZZ>= `  M
)  ->  ( N  =  M  \/  N  e.  ( ZZ>= `  ( M  +  1 ) ) ) )
903, 89syl 14 . . . . 5  |-  ( ph  ->  ( N  =  M  \/  N  e.  (
ZZ>= `  ( M  + 
1 ) ) ) )
9190adantr 270 . . . 4  |-  ( (
ph  /\  j  e.  W )  ->  ( N  =  M  \/  N  e.  ( ZZ>= `  ( M  +  1
) ) ) )
9257, 88, 91mpjaod 673 . . 3  |-  ( (
ph  /\  j  e.  W )  ->  (  seq M (  +  ,  F ) `  j
)  =  ( sum_ k  e.  ( M ... ( N  -  1 ) ) A  +  (  seq N (  +  ,  F ) `  j ) ) )
938, 10, 21, 28, 17, 31, 92climaddc2 10714 . 2  |-  ( ph  ->  seq M (  +  ,  F )  ~~>  ( sum_ k  e.  ( M ... ( N  -  1 ) ) A  +  sum_ k  e.  W  A
) )
941, 5, 6, 7, 93isumclim 10811 1  |-  ( ph  -> 
sum_ k  e.  Z  A  =  ( sum_ k  e.  ( M ... ( N  -  1 ) ) A  +  sum_ k  e.  W  A
) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 102    <-> wb 103    \/ wo 664    /\ w3a 924    = wceq 1289    e. wcel 1438    C_ wss 2999   (/)c0 3286   class class class wbr 3845   dom cdm 4438   ` cfv 5015  (class class class)co 5652   CCcc 7346   0cc0 7348   1c1 7349    + caddc 7351    < clt 7520    - cmin 7651   ZZcz 8748   ZZ>=cuz 9017   ...cfz 9422    seqcseq 9848    ~~> cli 10662   sum_csu 10738
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 579  ax-in2 580  ax-io 665  ax-5 1381  ax-7 1382  ax-gen 1383  ax-ie1 1427  ax-ie2 1428  ax-8 1440  ax-10 1441  ax-11 1442  ax-i12 1443  ax-bndl 1444  ax-4 1445  ax-13 1449  ax-14 1450  ax-17 1464  ax-i9 1468  ax-ial 1472  ax-i5r 1473  ax-ext 2070  ax-coll 3954  ax-sep 3957  ax-nul 3965  ax-pow 4009  ax-pr 4036  ax-un 4260  ax-setind 4353  ax-iinf 4403  ax-cnex 7434  ax-resscn 7435  ax-1cn 7436  ax-1re 7437  ax-icn 7438  ax-addcl 7439  ax-addrcl 7440  ax-mulcl 7441  ax-mulrcl 7442  ax-addcom 7443  ax-mulcom 7444  ax-addass 7445  ax-mulass 7446  ax-distr 7447  ax-i2m1 7448  ax-0lt1 7449  ax-1rid 7450  ax-0id 7451  ax-rnegex 7452  ax-precex 7453  ax-cnre 7454  ax-pre-ltirr 7455  ax-pre-ltwlin 7456  ax-pre-lttrn 7457  ax-pre-apti 7458  ax-pre-ltadd 7459  ax-pre-mulgt0 7460  ax-pre-mulext 7461  ax-arch 7462  ax-caucvg 7463
This theorem depends on definitions:  df-bi 115  df-dc 781  df-3or 925  df-3an 926  df-tru 1292  df-fal 1295  df-nf 1395  df-sb 1693  df-eu 1951  df-mo 1952  df-clab 2075  df-cleq 2081  df-clel 2084  df-nfc 2217  df-ne 2256  df-nel 2351  df-ral 2364  df-rex 2365  df-reu 2366  df-rmo 2367  df-rab 2368  df-v 2621  df-sbc 2841  df-csb 2934  df-dif 3001  df-un 3003  df-in 3005  df-ss 3012  df-nul 3287  df-if 3394  df-pw 3431  df-sn 3452  df-pr 3453  df-op 3455  df-uni 3654  df-int 3689  df-iun 3732  df-br 3846  df-opab 3900  df-mpt 3901  df-tr 3937  df-id 4120  df-po 4123  df-iso 4124  df-iord 4193  df-on 4195  df-ilim 4196  df-suc 4198  df-iom 4406  df-xp 4444  df-rel 4445  df-cnv 4446  df-co 4447  df-dm 4448  df-rn 4449  df-res 4450  df-ima 4451  df-iota 4980  df-fun 5017  df-fn 5018  df-f 5019  df-f1 5020  df-fo 5021  df-f1o 5022  df-fv 5023  df-isom 5024  df-riota 5608  df-ov 5655  df-oprab 5656  df-mpt2 5657  df-1st 5911  df-2nd 5912  df-recs 6070  df-irdg 6135  df-frec 6156  df-1o 6181  df-oadd 6185  df-er 6290  df-en 6456  df-dom 6457  df-fin 6458  df-pnf 7522  df-mnf 7523  df-xr 7524  df-ltxr 7525  df-le 7526  df-sub 7653  df-neg 7654  df-reap 8050  df-ap 8057  df-div 8138  df-inn 8421  df-2 8479  df-3 8480  df-4 8481  df-n0 8672  df-z 8749  df-uz 9018  df-q 9103  df-rp 9133  df-fz 9423  df-fzo 9550  df-iseq 9849  df-seq3 9850  df-exp 9951  df-ihash 10180  df-cj 10272  df-re 10273  df-im 10274  df-rsqrt 10427  df-abs 10428  df-clim 10663  df-isum 10739
This theorem is referenced by:  isum1p  10882  geolim2  10902  mertenslem2  10926  mertensabs  10927  effsumlt  10978  eirraplem  11060
  Copyright terms: Public domain W3C validator