1
#|-*-Lisp-*-=================================================================|#
3
#| coi: Computational Object Inference |#
5
#|===========================================================================|#
1
; Computational Object Inference
2
; Copyright (C) 2005-2014 Kookamara LLC
7
; 11410 Windermere Meadows
8
; Austin, TX 78759, USA
9
; http://www.kookamara.com/
11
; License: (An MIT/X11-style license)
13
; Permission is hereby granted, free of charge, to any person obtaining a
14
; copy of this software and associated documentation files (the "Software"),
15
; to deal in the Software without restriction, including without limitation
16
; the rights to use, copy, modify, merge, publish, distribute, sublicense,
17
; and/or sell copies of the Software, and to permit persons to whom the
18
; Software is furnished to do so, subject to the following conditions:
20
; The above copyright notice and this permission notice shall be included in
21
; all copies or substantial portions of the Software.
23
; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28
; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29
; DEALINGS IN THE SOFTWARE.
7
32
;; Primitive alist fixing and equivalence relations.
35
60
;; Interpreting Objects as Conses (consfix)
37
62
;; We can think of a mapping between all ACL2 objects and conses, so that any
38
63
;; atom is mapped to (nil . nil) and any cons is mapped to itself. The
39
64
;; function consfix applies this mapping for us, i.e., it interprets any ACL2
53
78
;; Here we check to make sure that our type prescription rule is as strong as
54
79
;; we think it is. Don't remove this event even though it has no effect on
55
80
;; the logical world.
56
81
(local (defthm test-type-prescription-of-consfix
57
82
(consp (consfix x))
59
84
:in-theory (union-theories '((:type-prescription consfix))
60
85
(theory 'minimal-theory))))))))
354
379
(defcong alist-equiv cons-equiv (car x) 1
356
381
:in-theory (e/d (alist-equiv alistfix)
357
382
(alistfix-type-consp)))))
359
384
(defthm alistfix-in-alist-equiv
360
(alist-equiv (alistfix a)
385
(alist-equiv (alistfix a)
362
387
:hints(("Goal" :in-theory (enable alist-equiv))))
374
399
:hints(("Goal" :in-theory (enable alist-equiv))))
376
401
(theory-invariant (incompatible (:rewrite equal-of-alist-fixes)
377
(:definition alist-equiv)))
402
(:definition alist-equiv)))
b'\\ No newline at end of file'