MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  efgi Structured version   Visualization version   GIF version

Theorem efgi 18956
Description: Value of the free group construction. (Contributed by Mario Carneiro, 27-Sep-2015.) (Revised by Mario Carneiro, 27-Feb-2016.)
Hypotheses
Ref Expression
efgval.w 𝑊 = ( I ‘Word (𝐼 × 2o))
efgval.r = ( ~FG𝐼)
Assertion
Ref Expression
efgi (((𝐴𝑊𝑁 ∈ (0...(♯‘𝐴))) ∧ (𝐽𝐼𝐾 ∈ 2o)) → 𝐴 (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩))

Proof of Theorem efgi
Dummy variables 𝑎 𝑏 𝑖 𝑟 𝑢 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 fveq2 6668 . . . . . . . . . . 11 (𝑢 = 𝐴 → (♯‘𝑢) = (♯‘𝐴))
21oveq2d 7180 . . . . . . . . . 10 (𝑢 = 𝐴 → (0...(♯‘𝑢)) = (0...(♯‘𝐴)))
3 id 22 . . . . . . . . . . . 12 (𝑢 = 𝐴𝑢 = 𝐴)
4 oveq1 7171 . . . . . . . . . . . 12 (𝑢 = 𝐴 → (𝑢 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩) = (𝐴 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩))
53, 4breq12d 5040 . . . . . . . . . . 11 (𝑢 = 𝐴 → (𝑢𝑟(𝑢 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩) ↔ 𝐴𝑟(𝐴 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩)))
652ralbidv 3111 . . . . . . . . . 10 (𝑢 = 𝐴 → (∀𝑎𝐼𝑏 ∈ 2o 𝑢𝑟(𝑢 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩) ↔ ∀𝑎𝐼𝑏 ∈ 2o 𝐴𝑟(𝐴 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩)))
72, 6raleqbidv 3303 . . . . . . . . 9 (𝑢 = 𝐴 → (∀𝑖 ∈ (0...(♯‘𝑢))∀𝑎𝐼𝑏 ∈ 2o 𝑢𝑟(𝑢 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩) ↔ ∀𝑖 ∈ (0...(♯‘𝐴))∀𝑎𝐼𝑏 ∈ 2o 𝐴𝑟(𝐴 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩)))
87rspcv 3519 . . . . . . . 8 (𝐴𝑊 → (∀𝑢𝑊𝑖 ∈ (0...(♯‘𝑢))∀𝑎𝐼𝑏 ∈ 2o 𝑢𝑟(𝑢 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩) → ∀𝑖 ∈ (0...(♯‘𝐴))∀𝑎𝐼𝑏 ∈ 2o 𝐴𝑟(𝐴 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩)))
9 oteq1 4767 . . . . . . . . . . . . 13 (𝑖 = 𝑁 → ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩ = ⟨𝑁, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩)
10 oteq2 4768 . . . . . . . . . . . . 13 (𝑖 = 𝑁 → ⟨𝑁, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩ = ⟨𝑁, 𝑁, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩)
119, 10eqtrd 2773 . . . . . . . . . . . 12 (𝑖 = 𝑁 → ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩ = ⟨𝑁, 𝑁, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩)
1211oveq2d 7180 . . . . . . . . . . 11 (𝑖 = 𝑁 → (𝐴 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩) = (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩))
1312breq2d 5039 . . . . . . . . . 10 (𝑖 = 𝑁 → (𝐴𝑟(𝐴 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩) ↔ 𝐴𝑟(𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩)))
14132ralbidv 3111 . . . . . . . . 9 (𝑖 = 𝑁 → (∀𝑎𝐼𝑏 ∈ 2o 𝐴𝑟(𝐴 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩) ↔ ∀𝑎𝐼𝑏 ∈ 2o 𝐴𝑟(𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩)))
1514rspcv 3519 . . . . . . . 8 (𝑁 ∈ (0...(♯‘𝐴)) → (∀𝑖 ∈ (0...(♯‘𝐴))∀𝑎𝐼𝑏 ∈ 2o 𝐴𝑟(𝐴 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩) → ∀𝑎𝐼𝑏 ∈ 2o 𝐴𝑟(𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩)))
168, 15sylan9 511 . . . . . . 7 ((𝐴𝑊𝑁 ∈ (0...(♯‘𝐴))) → (∀𝑢𝑊𝑖 ∈ (0...(♯‘𝑢))∀𝑎𝐼𝑏 ∈ 2o 𝑢𝑟(𝑢 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩) → ∀𝑎𝐼𝑏 ∈ 2o 𝐴𝑟(𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩)))
17 opeq1 4756 . . . . . . . . . . . 12 (𝑎 = 𝐽 → ⟨𝑎, 𝑏⟩ = ⟨𝐽, 𝑏⟩)
18 opeq1 4756 . . . . . . . . . . . 12 (𝑎 = 𝐽 → ⟨𝑎, (1o𝑏)⟩ = ⟨𝐽, (1o𝑏)⟩)
1917, 18s2eqd 14307 . . . . . . . . . . 11 (𝑎 = 𝐽 → ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩ = ⟨“⟨𝐽, 𝑏⟩⟨𝐽, (1o𝑏)⟩”⟩)
2019oteq3d 4772 . . . . . . . . . 10 (𝑎 = 𝐽 → ⟨𝑁, 𝑁, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩ = ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝑏⟩⟨𝐽, (1o𝑏)⟩”⟩⟩)
2120oveq2d 7180 . . . . . . . . 9 (𝑎 = 𝐽 → (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩) = (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝑏⟩⟨𝐽, (1o𝑏)⟩”⟩⟩))
2221breq2d 5039 . . . . . . . 8 (𝑎 = 𝐽 → (𝐴𝑟(𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩) ↔ 𝐴𝑟(𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝑏⟩⟨𝐽, (1o𝑏)⟩”⟩⟩)))
23 opeq2 4758 . . . . . . . . . . . . 13 (𝑏 = 𝐾 → ⟨𝐽, 𝑏⟩ = ⟨𝐽, 𝐾⟩)
24 difeq2 4005 . . . . . . . . . . . . . 14 (𝑏 = 𝐾 → (1o𝑏) = (1o𝐾))
2524opeq2d 4765 . . . . . . . . . . . . 13 (𝑏 = 𝐾 → ⟨𝐽, (1o𝑏)⟩ = ⟨𝐽, (1o𝐾)⟩)
2623, 25s2eqd 14307 . . . . . . . . . . . 12 (𝑏 = 𝐾 → ⟨“⟨𝐽, 𝑏⟩⟨𝐽, (1o𝑏)⟩”⟩ = ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩)
2726oteq3d 4772 . . . . . . . . . . 11 (𝑏 = 𝐾 → ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝑏⟩⟨𝐽, (1o𝑏)⟩”⟩⟩ = ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩)
2827oveq2d 7180 . . . . . . . . . 10 (𝑏 = 𝐾 → (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝑏⟩⟨𝐽, (1o𝑏)⟩”⟩⟩) = (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩))
2928breq2d 5039 . . . . . . . . 9 (𝑏 = 𝐾 → (𝐴𝑟(𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝑏⟩⟨𝐽, (1o𝑏)⟩”⟩⟩) ↔ 𝐴𝑟(𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩)))
30 df-br 5028 . . . . . . . . 9 (𝐴𝑟(𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩) ↔ ⟨𝐴, (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩)⟩ ∈ 𝑟)
3129, 30bitrdi 290 . . . . . . . 8 (𝑏 = 𝐾 → (𝐴𝑟(𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝑏⟩⟨𝐽, (1o𝑏)⟩”⟩⟩) ↔ ⟨𝐴, (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩)⟩ ∈ 𝑟))
3222, 31rspc2v 3534 . . . . . . 7 ((𝐽𝐼𝐾 ∈ 2o) → (∀𝑎𝐼𝑏 ∈ 2o 𝐴𝑟(𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩) → ⟨𝐴, (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩)⟩ ∈ 𝑟))
3316, 32sylan9 511 . . . . . 6 (((𝐴𝑊𝑁 ∈ (0...(♯‘𝐴))) ∧ (𝐽𝐼𝐾 ∈ 2o)) → (∀𝑢𝑊𝑖 ∈ (0...(♯‘𝑢))∀𝑎𝐼𝑏 ∈ 2o 𝑢𝑟(𝑢 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩) → ⟨𝐴, (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩)⟩ ∈ 𝑟))
3433adantld 494 . . . . 5 (((𝐴𝑊𝑁 ∈ (0...(♯‘𝐴))) ∧ (𝐽𝐼𝐾 ∈ 2o)) → ((𝑟 Er 𝑊 ∧ ∀𝑢𝑊𝑖 ∈ (0...(♯‘𝑢))∀𝑎𝐼𝑏 ∈ 2o 𝑢𝑟(𝑢 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩)) → ⟨𝐴, (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩)⟩ ∈ 𝑟))
3534alrimiv 1933 . . . 4 (((𝐴𝑊𝑁 ∈ (0...(♯‘𝐴))) ∧ (𝐽𝐼𝐾 ∈ 2o)) → ∀𝑟((𝑟 Er 𝑊 ∧ ∀𝑢𝑊𝑖 ∈ (0...(♯‘𝑢))∀𝑎𝐼𝑏 ∈ 2o 𝑢𝑟(𝑢 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩)) → ⟨𝐴, (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩)⟩ ∈ 𝑟))
36 opex 5319 . . . . 5 𝐴, (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩)⟩ ∈ V
3736elintab 4844 . . . 4 (⟨𝐴, (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩)⟩ ∈ {𝑟 ∣ (𝑟 Er 𝑊 ∧ ∀𝑢𝑊𝑖 ∈ (0...(♯‘𝑢))∀𝑎𝐼𝑏 ∈ 2o 𝑢𝑟(𝑢 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩))} ↔ ∀𝑟((𝑟 Er 𝑊 ∧ ∀𝑢𝑊𝑖 ∈ (0...(♯‘𝑢))∀𝑎𝐼𝑏 ∈ 2o 𝑢𝑟(𝑢 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩)) → ⟨𝐴, (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩)⟩ ∈ 𝑟))
3835, 37sylibr 237 . . 3 (((𝐴𝑊𝑁 ∈ (0...(♯‘𝐴))) ∧ (𝐽𝐼𝐾 ∈ 2o)) → ⟨𝐴, (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩)⟩ ∈ {𝑟 ∣ (𝑟 Er 𝑊 ∧ ∀𝑢𝑊𝑖 ∈ (0...(♯‘𝑢))∀𝑎𝐼𝑏 ∈ 2o 𝑢𝑟(𝑢 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩))})
39 efgval.w . . . 4 𝑊 = ( I ‘Word (𝐼 × 2o))
40 efgval.r . . . 4 = ( ~FG𝐼)
4139, 40efgval 18954 . . 3 = {𝑟 ∣ (𝑟 Er 𝑊 ∧ ∀𝑢𝑊𝑖 ∈ (0...(♯‘𝑢))∀𝑎𝐼𝑏 ∈ 2o 𝑢𝑟(𝑢 splice ⟨𝑖, 𝑖, ⟨“⟨𝑎, 𝑏⟩⟨𝑎, (1o𝑏)⟩”⟩⟩))}
4238, 41eleqtrrdi 2844 . 2 (((𝐴𝑊𝑁 ∈ (0...(♯‘𝐴))) ∧ (𝐽𝐼𝐾 ∈ 2o)) → ⟨𝐴, (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩)⟩ ∈ )
43 df-br 5028 . 2 (𝐴 (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩) ↔ ⟨𝐴, (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩)⟩ ∈ )
4442, 43sylibr 237 1 (((𝐴𝑊𝑁 ∈ (0...(♯‘𝐴))) ∧ (𝐽𝐼𝐾 ∈ 2o)) → 𝐴 (𝐴 splice ⟨𝑁, 𝑁, ⟨“⟨𝐽, 𝐾⟩⟨𝐽, (1o𝐾)⟩”⟩⟩))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 399  wal 1540   = wceq 1542  wcel 2113  {cab 2716  wral 3053  cdif 3838  cop 4519  cotp 4521   cint 4833   class class class wbr 5027   I cid 5424   × cxp 5517  cfv 6333  (class class class)co 7164  1oc1o 8117  2oc2o 8118   Er wer 8310  0cc0 10608  ...cfz 12974  chash 13775  Word cword 13948   splice csplice 14193  ⟨“cs2 14285   ~FG cefg 18943
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1802  ax-4 1816  ax-5 1916  ax-6 1974  ax-7 2019  ax-8 2115  ax-9 2123  ax-10 2144  ax-11 2161  ax-12 2178  ax-ext 2710  ax-rep 5151  ax-sep 5164  ax-nul 5171  ax-pow 5229  ax-pr 5293  ax-un 7473  ax-cnex 10664  ax-resscn 10665  ax-1cn 10666  ax-icn 10667  ax-addcl 10668  ax-addrcl 10669  ax-mulcl 10670  ax-mulrcl 10671  ax-mulcom 10672  ax-addass 10673  ax-mulass 10674  ax-distr 10675  ax-i2m1 10676  ax-1ne0 10677  ax-1rid 10678  ax-rnegex 10679  ax-rrecex 10680  ax-cnre 10681  ax-pre-lttri 10682  ax-pre-lttrn 10683  ax-pre-ltadd 10684  ax-pre-mulgt0 10685
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 847  df-3or 1089  df-3an 1090  df-tru 1545  df-fal 1555  df-ex 1787  df-nf 1791  df-sb 2074  df-mo 2540  df-eu 2570  df-clab 2717  df-cleq 2730  df-clel 2811  df-nfc 2881  df-ne 2935  df-nel 3039  df-ral 3058  df-rex 3059  df-reu 3060  df-rab 3062  df-v 3399  df-sbc 3680  df-csb 3789  df-dif 3844  df-un 3846  df-in 3848  df-ss 3858  df-pss 3860  df-nul 4210  df-if 4412  df-pw 4487  df-sn 4514  df-pr 4516  df-tp 4518  df-op 4520  df-ot 4522  df-uni 4794  df-int 4834  df-iun 4880  df-br 5028  df-opab 5090  df-mpt 5108  df-tr 5134  df-id 5425  df-eprel 5430  df-po 5438  df-so 5439  df-fr 5478  df-we 5480  df-xp 5525  df-rel 5526  df-cnv 5527  df-co 5528  df-dm 5529  df-rn 5530  df-res 5531  df-ima 5532  df-pred 6123  df-ord 6169  df-on 6170  df-lim 6171  df-suc 6172  df-iota 6291  df-fun 6335  df-fn 6336  df-f 6337  df-f1 6338  df-fo 6339  df-f1o 6340  df-fv 6341  df-riota 7121  df-ov 7167  df-oprab 7168  df-mpo 7169  df-om 7594  df-1st 7707  df-2nd 7708  df-wrecs 7969  df-recs 8030  df-rdg 8068  df-1o 8124  df-2o 8125  df-er 8313  df-map 8432  df-en 8549  df-dom 8550  df-sdom 8551  df-fin 8552  df-card 9434  df-pnf 10748  df-mnf 10749  df-xr 10750  df-ltxr 10751  df-le 10752  df-sub 10943  df-neg 10944  df-nn 11710  df-n0 11970  df-z 12056  df-uz 12318  df-fz 12975  df-fzo 13118  df-hash 13776  df-word 13949  df-concat 14005  df-s1 14032  df-substr 14085  df-pfx 14115  df-splice 14194  df-s2 14292  df-efg 18946
This theorem is referenced by:  efgi0  18957  efgi1  18958
  Copyright terms: Public domain W3C validator