From 62c1c8f306bff84b74b3b1c935d0d6722e1251a2 Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Wed, 27 May 2020 21:31:35 +0200 Subject: 1. Define Maybe in terms of other types. 2. Move More_Types to Spartan --- hott/More_Types.thy | 91 ----------------------------------------------------- 1 file changed, 91 deletions(-) delete mode 100644 hott/More_Types.thy (limited to 'hott/More_Types.thy') diff --git a/hott/More_Types.thy b/hott/More_Types.thy deleted file mode 100644 index d29d794..0000000 --- a/hott/More_Types.thy +++ /dev/null @@ -1,91 +0,0 @@ -theory More_Types -imports Spartan - -begin - - -section \Sum type\ - -axiomatization - Sum :: \o \ o \ o\ and - inl :: \o \ o \ o \ o\ and - inr :: \o \ o \ o \ o\ and - SumInd :: \o \ o \ (o \ o) \ (o \ o) \ (o \ o) \ o \ o\ - -notation Sum (infixl "\" 50) - -axiomatization where - SumF: "\A: U i; B: U i\ \ A \ B: U i" and - - Sum_inl: "\a: A; B: U i\ \ inl A B a: A \ B" and - - Sum_inr: "\b: B; A: U i\ \ inr A B b: A \ B" and - - SumE: "\ - s: A \ B; - \s. s: A \ B \ C s: U i; - \a. a: A \ c a: C (inl A B a); - \b. b: B \ d b: C (inr A B b) - \ \ SumInd A B (\s. C s) (\a. c a) (\b. d b) s: C s" and - - Sum_comp_inl: "\ - a: A; - \s. s: A \ B \ C s: U i; - \a. a: A \ c a: C (inl A B a); - \b. b: B \ d b: C (inr A B b) - \ \ SumInd A B (\s. C s) (\a. c a) (\b. d b) (inl A B a) \ c a" and - - Sum_comp_inr: "\ - b: B; - \s. s: A \ B \ C s: U i; - \a. a: A \ c a: C (inl A B a); - \b. b: B \ d b: C (inr A B b) - \ \ SumInd A B (\s. C s) (\a. c a) (\b. d b) (inr A B b) \ d b" - -lemmas - [intros] = SumF Sum_inl Sum_inr and - [elims] = SumE and - [comps] = Sum_comp_inl Sum_comp_inr - - -section \Empty and unit types\ - -axiomatization - Top :: \o\ and - tt :: \o\ and - TopInd :: \(o \ o) \ o \ o \ o\ -and - Bot :: \o\ and - BotInd :: \(o \ o) \ o \ o\ - -notation Top ("\") and Bot ("\") - -axiomatization where - TopF: "\: U i" and - - TopI: "tt: \" and - - TopE: "\a: \; \x. x: \ \ C x: U i; c: C tt\ \ TopInd (\x. C x) c a: C a" and - - Top_comp: "\\x. x: \ \ C x: U i; c: C tt\ \ TopInd (\x. C x) c tt \ c" -and - BotF: "\: U i" and - - BotE: "\x: \; \x. x: \ \ C x: U i\ \ BotInd (\x. C x) x: C x" - -lemmas - [intros] = TopF TopI BotF and - [elims] = TopE BotE and - [comps] = Top_comp - - -section \Booleans\ - -definition "Bool \ \ \ \" -definition "true \ inl \ \ tt" -definition "false \ inr \ \ tt" - -\ \Can define if-then-else etc.\ - - -end -- cgit v1.2.3