From 01a4d1f7cc1920033eb8df8e49e9216e37bad1ed Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Fri, 3 Apr 2020 01:30:02 +0200 Subject: 1. change var names. 2. add and mul --- hott/Nat.thy | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'hott/Nat.thy') diff --git a/hott/Nat.thy b/hott/Nat.thy index 269d6bb..b88398b 100644 --- a/hott/Nat.thy +++ b/hott/Nat.thy @@ -19,23 +19,23 @@ where n: Nat; n\<^sub>0: C 0; \n. n: Nat \ C n: U i; - \n c. \n: Nat; c: C n\ \ f n c: C (suc n) - \ \ NatInd (\n. C n) n\<^sub>0 (\n c. f n c) n: C n" and + \k c. \k: Nat; c: C k\ \ f k c: C (suc k) + \ \ NatInd (\n. C n) n\<^sub>0 (\k c. f k c) n: C n" and Nat_comp_zero: "\ n\<^sub>0: C 0; - \n c. \n: Nat; c: C n\ \ f n c: C (suc n); + \k c. \k: Nat; c: C k\ \ f k c: C (suc k); \n. n: Nat \ C n: U i - \ \ NatInd (\n. C n) n\<^sub>0 (\n c. f n c) 0 \ n\<^sub>0" and + \ \ NatInd (\n. C n) n\<^sub>0 (\k c. f k c) 0 \ n\<^sub>0" and Nat_comp_suc: "\ n: Nat; n\<^sub>0: C 0; - \n c. \n: Nat; c: C n\ \ f n c: C (suc n); + \k c. \k: Nat; c: C k\ \ f k c: C (suc k); \n. n: Nat \ C n: U i \ \ - NatInd (\n. C n) n\<^sub>0 (\n c. f n c) (suc n) \ - f n (NatInd (\n. C n) n\<^sub>0 (\n c. f n c) n)" + NatInd (\n. C n) n\<^sub>0 (\k c. f k c) (suc n) \ + f n (NatInd (\n. C n) n\<^sub>0 (\k c. f k c) n)" lemmas [intros] = NatF Nat_zero Nat_suc and @@ -46,7 +46,10 @@ lemmas section \Basic arithmetic\ definition add (infixl "+" 50) where - [comps]: "m + n \ NatInd (K Nat) n (K $ \n. suc n) m" + [comps]: "m + n \ NatInd (K Nat) n (K suc) m" + +definition mul (infixl "*" 55) where + [comps]: "m * n \ NatInd (K Nat) 0 (K $ add n) m" end -- cgit v1.2.3