Commit Graph

60 Commits

Author SHA1 Message Date
Gerwin Klein ac87d6e28b lib: update for Word_Lib tweaks
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 0f633ce387 isabelle2021-1 lib: update Lib session, retire wpx
The benefit of the wpx method is not worth the maintenance effort.
There are still a few instances of wpx left in AInvs, which will have
to be fixed later.

We are keeping the wps method from the same file (WPEx.thy), because
that is used more widely and does not break with Isabelle2021-1

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein f2fc2345fe isabelle-2021: update Lib
This includes the removal of the theory Extend_Locale, which was an
(unused) experiment.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 83710a1d81 isabelle-2021: Lib update
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 28bc26c925 isabelle-2021: HOL-Word now in HOL-Library
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Ryan Barry a99a2bf739 various: resolve some existing fixmes
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Ryan Barry 0d53d6909f lib+ainvs+access+refine: resolve most of the new fixmes
Signed-off-by: Ryan Barry <ryan.barry@unsw.edu.au>
2021-07-22 10:44:43 +10:00
Gerwin Klein bb90c7541e lib: avoid internal index names
The lemma set `exception_set_finite` contained the members
`exception_set_finite_1` and `exception_set_finite_2`. The `_1`/`_2`
suffix clashes with the internal `(1)` suffix for lemma set references,
which in some code paths is internally represented as `_1`, leading to
an error message.

Curiously this error message only occurs when the proof is run
single-threaded, so it has gone unnoticed for quite some time.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-11-24 08:34:29 +11:00
Gerwin Klein 408bf41351 lib: Isabelle2020 update
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-10-27 15:52:31 +10:00
Rafal Kolanski 0cc971f491 lib: add lemmas from RISCV64 theories
Some improved ccorres lemmas, dealing with throw and catch, and usual
assortment of misc list/set/map lemmas.

Signed-off-by: Rafal Kolanski <rafal.kolanski@data61.csiro.au>
2020-06-08 20:41:10 +08:00
Edward Pierzchalski bd4392d132 lib: add ML_goal command
Sometimes we want to prove a fact, but the fact is painful or
error-prone to type out manually. In these cases, we'd like to construct
the goal fact using ML and then immediately enter a proof block.

Previously, we could achieve something like this through careful use of
`Thm.trivial` and `schematic_goal`, but this would clutter up the ML
namespace and wouln't handle meta conjuncts (`&&&`). The new `ML_goal`
command addresses both of these issues.

Signed-off-by: Edward Pierzchalski <ed.pierzchalski@data61.csiro.au>
2020-05-13 11:53:50 +08:00
Victor Phan 51ff27cce6 lib: remove eq_restrict_map_None from the simp set
Hotfix for a7ed68e75d, which moved some lemmas from X64 Move_C.thy into
Lib. `eq_restrict_map_None` being in the simp set caused several
breakages across other arches.

Signed-off-by: Victor Phan <Victor.Phan@data61.csiro.au>
2020-04-23 11:40:38 +10:00
Victor Phan a7ed68e75d x64 crefine/lib: move word lemmas out of Move_C into Word_Lemmas_64_Internal
Signed-off-by: Victor Phan <Victor.Phan@data61.csiro.au>
2020-04-21 14:42:22 +10:00
Gerwin Klein a424d55e3e licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
Victor Phan 966734c69b Collect abstract lemmas in Refine
Create ArchMove_R.thy for transporting arch specific lemmas (and generic
lemmas that are used somewhat specifically by one architecture) to theory
files before Refine.

Create Move_R.thy as an arch generic Refine theory file for transporting
generic lemmas to theory files before Refine.

Also delete some lemmas that have existed earlier already or are not
needed.

Rename Move.thy in CRefine to Move_C.thy for consistency.
2020-02-21 11:49:25 +11:00
Rafal Kolanski 327bed748d lib: migrate distinct_map_enum into Lib 2020-02-13 12:29:52 +11:00
Victor Phan bbfd9e2a82 lib: add helper lemmas 2019-10-10 11:27:17 +11:00
Rafal Kolanski e46f2d7af0 lib: add graph_of_SomeD 2019-07-31 16:55:32 +10:00
Gerwin Klein 65cc19c172 lib: move up library lemmas from RISCV64 and X64 2019-07-31 16:55:31 +10:00
Rafal Kolanski 4cc9a1fb19 lib: add option_Some_value_independent 2019-07-31 16:55:31 +10:00
Japheth Lim 18a40abd44 lib: move int bitwise lemmas from NatBitwise to Lib
NB: this now imports HOL-Word into Lib and Lib in turn
into NatBitwise.
2019-07-24 11:00:13 +10:00
Gerwin Klein c34840d09b global: isabelle update_cartouches 2019-06-14 11:41:21 +10:00
Michael McInerney 6ff1a38f65 lib: update for Isabelle 2019 2019-06-13 16:22:33 +10:00
Edward Pierzchalski c1e9a09e26 lib: move "tl_nat_list_simp" up. 2019-05-28 10:00:10 +10:00
Callum Bannister bba5bfd905 lib + sysinit: whitespace cleanup; renamed lookup_obj 2019-02-19 15:43:10 +11:00
Gerwin Klein 62b0ab207b Word_Lib: consolidate LemmaBucket and Lib lemmas into Word_Lib 2018-08-20 09:06:36 +10:00
Gerwin Klein 1ae3a8d65b Isabelle2018: Lib update 2018-08-20 09:06:36 +10:00
Gerwin Klein 6b9d9d24dd Isabelle2018: new "op x" syntax; now is "(x)"
(result of "isabelle update_op -m <dir>")
2018-08-20 09:06:35 +10:00
Gerwin Klein b5cdf4703f globally use session-qualified imports; add Lib session
Session-qualified imports will be required for Isabelle2018 and help clarify
the structure of sessions in the build tree.

This commit mainly adds a new set of sessions for lib/, including a Lib
session that includes most theories in lib/ and a few separate sessions for
parts that have dependencies beyond CParser or are separate AFP sessions.
The group "lib" collects all lib/ sessions.

As a consequence, other theories should use lib/ theories by session name,
not by path, which in turns means spec and proof sessions should also refer
to each other by session name, not path, to avoid duplicate theory errors in
theory merges later.
2018-08-20 09:06:34 +10:00
Thomas Sewell 891ae7cfa4 lib: some simple rules about rtrancl/rtranclp.
These generalise trancl_id from HOL to cover rtrancl and rtranclp.

Also improve one minor proof.
2018-05-28 15:39:39 +10:00
Thomas Sewell 26df0c04dd lib: Replace subseq->match abbreviation.
The subseq_abbreviation mechanism was a useful way of quoting some of a
definition or term, specialised to the case of left-associated sequences.

Lambda abstractions are now handled better.

The previous subseq mechanism required some generalisations. It is now replaced
by match_abbreviation, which is a more general approach.

The match mechanism picks a term, can select a matching subterm, and can
rewrite the selected term based on pattern matching also. The new mechanism
can cover all the cases of the previous one, as shown in examples.
2018-05-10 15:00:22 +10:00
Thomas Sewell 9cef82ebe3 lib: Subseq_Abbreviation, quote subsequence terms.
It's annoying that, given automatic definitions (such as we have
with the Haskell translator and C parser), there's no way to capture
a few lines of them.

This mechanism allows you to add an abbreviation for some subsequence of
elements, found somewhere in a theorem, where a sequence is defined by its
constructor and the start and end points are matched by pattern matching.
2018-04-17 15:02:12 +10:00
Matthew Brecknell d27f84767a lib: add methods for extracting conjuncts from the conclusion 2017-11-28 19:02:49 +11:00
Matthew Brecknell 0d3325ee68 Isabelle2017: update lib for RC0
* ML Proof_Context.fact_alias renamed to alias_fact.

  * Named_Target.init removed redundant parameter.

  * Simplified Greatest, removed GreatestM.

  * Introduced thm_node type in proofterm.ML.
2017-10-30 12:23:26 +11:00
Matthew Brecknell 0102ef172a Isabelle2017: remove String_Compare
This was a workaround for an Isabelle2016-1 performace regression, and
is no longer required.
2017-10-30 12:23:26 +11:00
Thomas Sewell 619aae2184 Add some methods to trym. 2017-10-27 13:39:32 +11:00
Thomas Sewell ed3b26f4ec Add "Try Methods" mechanism trym.
Like try0/try but extensible by new methods. Methods must currently
be single tokens, however Eisbach makes it easy to install such
abbreviations.
2017-10-27 13:21:08 +11:00
Matthew Brecknell 184d6b70b7 remove most tab characters 2017-10-20 14:22:36 +11:00
Thomas Sewell 4eedad846a Add command/keyword 'value_abbreviation'.
This computes a value (like the existing value keyword) and also saves
the result of that computation as an abbreviation.

This will be useful in CRefine etc to give names to magic numbers that
derive from configuration variables/constants.
2017-10-12 12:44:45 +11:00
Matthew Brecknell 238e8b307e x64: merge master 2017-07-21 11:27:12 +10:00
Alejandro Gomez-Londono 796887d9b1 Removes all trailing whitespaces 2017-07-12 15:13:51 +10:00
Matthew Brecknell 895390e8cb x64: ArchVSpaceLookup_AI: prove vs_lookup_pages1_wellformed_order
Show that there is a measure on vs_refs, on which vs_lookup_pages1 is
strictly monotonically increasing.

We also prove various lemmas relating vs_lookup and vs_lookup_pages, and
valid_arch_objs.

There are many things previously proved in ArchRetype_AI and
ArchDetype_AI that are now broken because Xin's work overwrote some
things I also proved in ArchVSpace_AI. I'm not fixing them here.
2017-02-08 17:36:54 +11:00
Matthew Brecknell db13ff19bb Isabelle2016-1: configure c-parser with faster string comparisons 2017-01-05 14:27:44 +11:00
Matthew Brecknell b5158e31bc Isabelle2016-1: fix proofs involving UNION
SUPREMUM changed from a definition to an abbreviation.

A number of proofs that previously used blast, fastforce or auto to
solve goals involving UNION, now either fail or loop. This commit
includes various ad-hoc workarounds.
2017-01-05 14:27:33 +11:00
Matthew Brecknell 41d4aa4f1d Isabelle2016-1: update references to renamed constants and facts 2017-01-05 14:23:05 +11:00
Gerwin Klein 28e8cd71f9 lib: include NICTA_Tools in Lib (ASpec image and friends)
(VER-587)
2016-06-22 23:02:10 +10:00
Gerwin Klein 99bf909013 lib: make CCorres_Rewrite available in CRefine and friends 2016-06-20 08:34:33 +10:00
Gerwin Klein cd930d2d2d word_lib: move unrelated lemmas out of Word_Lib into Lib 2016-05-16 21:11:40 +10:00
Gerwin Klein 2d8f9596ec word_lib: Distinct_Prop cleanup 2016-05-16 21:11:40 +10:00
Gerwin Klein 2367dff983 word_lib: move out unused HOL_Lemmas 2016-05-16 21:11:40 +10:00