Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reworked "strange_cases" by the newly added "term_laml_cases" #1161

Merged
merged 3 commits into from
Nov 1, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions examples/lambda/barendregt/chap2Script.sml
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,16 @@ val is_comb_APP_EXISTS = store_thm(
``!t. is_comb t = (?u v. t = u @@ v)``,
PROVE_TAC [term_CASES, is_comb_thm]);

Theorem is_comb_appstar_exists :
binghe marked this conversation as resolved.
Show resolved Hide resolved
binghe marked this conversation as resolved.
Show resolved Hide resolved
!M. is_comb M ==> ?t args. (M = t @* args) /\ args <> [] /\ ~is_comb t
Proof
HO_MATCH_MP_TAC simple_induction >> rw []
>> reverse (Cases_on ‘is_comb M’)
>- (qexistsl_tac [‘M’, ‘[M']’] >> rw [])
>> FULL_SIMP_TAC std_ss [GSYM appstar_SNOC]
>> qexistsl_tac [‘t’, ‘SNOC M' args’] >> rw []
QED

val is_comb_rator_rand = store_thm(
"is_comb_rator_rand",
``!t. is_comb t ==> (rator t @@ rand t = t)``,
Expand Down