From 8e4ca285430c7bcdabbd4ea34da38e0770f4a832 Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Mon, 17 Sep 2018 15:33:42 +0200 Subject: Tweak proof --- HoTT_Methods.thy | 4 ++-- Proj.thy | 13 +++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/HoTT_Methods.thy b/HoTT_Methods.thy index 9849195..411176e 100644 --- a/HoTT_Methods.thy +++ b/HoTT_Methods.thy @@ -50,10 +50,10 @@ method derive uses lems = (routine add: lems | compute comp: lems)+ section \Induction\ -text " +text \ Placeholder section for the automation of induction, i.e. using the elimination rules. At the moment one must directly apply them with \rule X_elim\. -" +\ end diff --git a/Proj.thy b/Proj.thy index f272224..e76e8d3 100644 --- a/Proj.thy +++ b/Proj.thy @@ -7,10 +7,7 @@ Projection functions \fst\ and \snd\ for the dependent *) theory Proj -imports - HoTT_Methods - Prod - Sum +imports HoTT_Methods Prod Sum begin @@ -28,12 +25,12 @@ unfolding fst_def by compute (derive lems: assms) lemma snd_type: assumes "A: U i" and "B: A \ U i" and "p: \x:A. B x" shows "snd p: B (fst p)" -unfolding snd_def proof - show "\p. p: \x:A. B x \ B (fst p): U i" by (derive lems: assms fst_type) - +unfolding snd_def proof (derive lems: assms) + show "\p. p: \x:A. B x \ fst p: A" using assms(1-2) by (rule fst_type) + fix x y assume asm: "x: A" "y: B x" show "y: B (fst )" by (derive lems: asm assms fst_comp) -qed fact +qed lemma snd_comp: assumes "A: U i" and "B: A \ U i" and "a: A" and "b: B a" shows "snd \ b" -- cgit v1.2.3