From 9ea0e76f92383ab14859cd5857f5a3ef1acec2c0 Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Wed, 23 May 2018 08:26:37 +0200 Subject: pre-system upgrade commit --- HoTT_Test.thy | 58 ---------------------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 HoTT_Test.thy (limited to 'HoTT_Test.thy') diff --git a/HoTT_Test.thy b/HoTT_Test.thy deleted file mode 100644 index b37ac76..0000000 --- a/HoTT_Test.thy +++ /dev/null @@ -1,58 +0,0 @@ -theory HoTT_Test -imports HoTT -begin - -text \Check trivial stuff:\ - -lemma "Null : U" - by (rule Null_form) - -lemma "\A \ B; x : B\ \ x : A" -proof - - assume "A \ B" - then have "B \ A" by (rule Pure.symmetric) - then have "x : B \ x :A" by (rule equal_types) - oops -(* qed---figure out how to discharge assumptions *) - -text \ -Do functions behave like we expect them to? -(Or, is my implementation at least somewhat correct?... -\ - -\ {* NOTE!!! The issues with substitution here. -We need the HoTT term \b\ and the type family \B\ to indeed be a Pure \-term! -This seems to mean that I have to implement the HoTT types in more than one Pure type. -See CTT.thy for examples. -*} - -lemma "A \ B \ (\<^bold>\x:A. x) : B\A" -proof - - have "A \ B \ B \ A" by (rule Pure.symmetric) - then have "\x::Term. A \ B \ x : B \ x : A" by (rule equal_types) - thus "A \ B \ (\<^bold>\x:A. x) : B\A" by (rule Function_intro) -qed - -lemma "\<^bold>\x. \<^bold>\y. x : A\B\A" -proof - - have "\x. x : A \ \<^bold>\y. x : B \ A" by (rule Function_intro) - thus "\<^bold>\x. \<^bold>\y. x : A\B\A" by (rule Function_intro) -qed - -text \Here's a dumb proof that 2 is a natural number:\ - -lemma "succ(succ 0) : Nat" -proof - - have "0 : Nat" by (rule Nat_intro1) - from this have "(succ 0) : Nat" by (rule Nat_intro2) - thus "succ(succ 0) : Nat" by (rule Nat_intro2) -qed - -text \ -We can of course iterate the above for as many applications of \succ\ as we like. -The next thing to do is to implement some kind of induction tactic to automate such proofs. - -When we get more stuff working, I'd like to aim for formalizing the encode-decode method. -\ - -end \ No newline at end of file -- cgit v1.2.3