From 2e807b74bd0f4e9a2ccfcb861bef876dba5aa066 Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Sat, 30 May 2020 14:38:12 +0200 Subject: fix name --- hott/Nat.thy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'hott') diff --git a/hott/Nat.thy b/hott/Nat.thy index e8657a4..e36d6be 100644 --- a/hott/Nat.thy +++ b/hott/Nat.thy @@ -49,6 +49,8 @@ abbreviation "NatRec C \ NatInd (\_. C)" section \Basic arithmetic\ +subsection \Addition\ + definition add (infixl "+" 120) where "m + n \ NatRec Nat n (K suc) m" lemma add_type [typechk]: @@ -82,7 +84,7 @@ Lemma (derive) add_suc: \ vars _ ih by reduce (eq ih; intro) done -Lemma (derive) suc_monotone: +Lemma (derive) suc_eq: assumes "m: Nat" "n: Nat" shows "p: m = n \ suc m = suc n" by (eq p) intro @@ -108,6 +110,8 @@ Lemma (derive) add_comm: qed done +subsection \Multiplication\ + definition mul (infixl "*" 120) where [comps]: "m * n \ NatRec Nat 0 (K $ add n) m" -- cgit v1.2.3