Skip to content

Commit

Permalink
avoid using bossLib
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordon-Sau committed Mar 6, 2024
1 parent 7d47106 commit abd41db
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions src/relation/relationScript.sml
Original file line number Diff line number Diff line change
Expand Up @@ -1129,22 +1129,18 @@ Theorem WF_PULL:
(!x y. R' x y ==> P (f x) /\ f x = f y /\ R (f x) (g x) (g y)) ==>
WF R'
Proof
rw[WF_DEF] >>
reverse $ Cases_on `?w'. P (f w') /\ B w'`
>- (fs[] >> metis_tac[]) >>
rw[] >>
first_x_assum drule >>
qpat_x_assum `B w` kall_tac >>
disch_then $ qspec_then
`\x. ?y. x = g y /\ B y /\ P (f y) /\ f y = f w'` assume_tac >>
fs[PULL_EXISTS] >>
first_x_assum (dxrule_then dxrule) >>
rw[] >>
first_assum $ irule_at (Pos hd) >>
rw[] >>
last_x_assum drule >>
rw[] >>
gvs[]
rw_tac(srw_ss())[WF_DEF] >>
Cases_on `?w'. P (f w') /\ B w'`
>- (
POP_ASSUM STRIP_ASSUME_TAC >>
FIRST_X_ASSUM drule >>
Q.PAT_X_ASSUM `B w` (K ALL_TAC) >>
DISCH_THEN $ Q.SPEC_THEN
`\x. ?y. x = g y /\ B y /\ P (f y) /\ f y = f w'`
(ASSUME_TAC o SIMP_RULE bool_ss [PULL_EXISTS]) >>
FIRST_X_ASSUM (dxrule_then dxrule) >>
METIS_TAC[]) >>
METIS_TAC[]
QED

(*---------------------------------------------------------------------------
Expand Down

0 comments on commit abd41db

Please sign in to comment.