From aff3d43d9865e7b8d082f0c239d2c73eee1fb291 Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Thu, 21 Jan 2021 00:52:13 +0000 Subject: renamings --- spartan/core/Spartan.thy | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'spartan/core/Spartan.thy') diff --git a/spartan/core/Spartan.thy b/spartan/core/Spartan.thy index ffe3778..5046b6a 100644 --- a/spartan/core/Spartan.thy +++ b/spartan/core/Spartan.thy @@ -295,7 +295,7 @@ method_setup this = subsection \Rewriting\ -consts rewrite_hole :: "'a::{}" ("\") +consts compute_hole :: "'a::{}" ("\") lemma eta_expand: fixes f :: "'a::{} \ 'b::{}" @@ -319,10 +319,10 @@ lemma imp_cong_eq: done ML_file \~~/src/HOL/Library/cconv.ML\ -ML_file \rewrite.ML\ +ML_file \comp.ML\ -\ \\reduce\ simplifies terms via computational equalities\ -method reduce uses add = +\ \\compute\ simplifies terms via computational equalities\ +method compute uses add = changed \repeat_new \(simp add: comp add | subst comp); typechk?\\ @@ -396,7 +396,7 @@ Lemma refine_codomain: "f: \x: A. B x" "\x. x: A \ f `x: C x" shows "f: \x: A. C x" - by (rewrite eta_exp) + by (comp eta_exp) Lemma lift_universe_codomain: assumes "A: U i" "f: A \ U j" @@ -432,7 +432,7 @@ Lemma funcomp_assoc [comp]: "h: \x: C. D x" shows "(h \\<^bsub>B\<^esub> g) \\<^bsub>A\<^esub> f \ h \\<^bsub>A\<^esub> g \\<^bsub>A\<^esub> f" - unfolding funcomp_def by reduce + unfolding funcomp_def by compute Lemma funcomp_lambda_comp [comp]: assumes @@ -441,7 +441,7 @@ Lemma funcomp_lambda_comp [comp]: "\x. x: B \ c x: C x" shows "(\x: B. c x) \\<^bsub>A\<^esub> (\x: A. b x) \ \x: A. c (b x)" - unfolding funcomp_def by reduce + unfolding funcomp_def by compute Lemma funcomp_apply_comp [comp]: assumes @@ -449,7 +449,7 @@ Lemma funcomp_apply_comp [comp]: "f: A \ B" "g: \x: B. C x" "x: A" shows "(g \\<^bsub>A\<^esub> f) x \ g (f x)" - unfolding funcomp_def by reduce + unfolding funcomp_def by compute subsection \Notation\ @@ -465,17 +465,17 @@ abbreviation id where "id A \ \x: A. x" lemma id_type [type]: "A: U i \ id A: A \ A" and id_comp [comp]: "x: A \ (id A) x \ x" \ \for the occasional manual rewrite\ - by reduce+ + by compute+ Lemma id_left [comp]: assumes "A: U i" "B: U i" "f: A \ B" shows "(id B) \\<^bsub>A\<^esub> f \ f" - by (rewrite eta_exp[of f]) (reduce, rule eta) + by (comp eta_exp[of f]) (compute, rule eta) Lemma id_right [comp]: assumes "A: U i" "B: U i" "f: A \ B" shows "f \\<^bsub>A\<^esub> (id A) \ f" - by (rewrite eta_exp[of f]) (reduce, rule eta) + by (comp eta_exp[of f]) (compute, rule eta) lemma id_U [type]: "id (U i): U i \ U i" @@ -496,7 +496,7 @@ Lemma fst_comp [comp]: assumes "A: U i" "\x. x: A \ B x: U i" "a: A" "b: B a" shows "fst A B \ a" - unfolding fst_def by reduce + unfolding fst_def by compute Lemma snd_type [type]: assumes "A: U i" "\x. x: A \ B x: U i" @@ -506,7 +506,7 @@ Lemma snd_type [type]: Lemma snd_comp [comp]: assumes "A: U i" "\x. x: A \ B x: U i" "a: A" "b: B a" shows "snd A B \ b" - unfolding snd_def by reduce + unfolding snd_def by compute subsection \Notation\ -- cgit v1.2.3