Filtering...

permp

books/acl2s/sorting/permp
other
(in-package "ACL2S")
other
(definec del
  (e :all l :tl)
  :tl (match l
    (nil nil)
    ((!e . r) r)
    ((f . r) (cons f (del e r)))))
other
(sig del
  (all (listof :a))
  =>
  (listof :a))
other
(definec permp
  (x y :tl)
  :bool (match x
    (nil (endp y))
    ((f . r) (and (in f y)
        (permp r (del f y))))))
other
(property permp-cons
  (e :all x y :tl)
  :h (in e x)
  :b (== (permp (del e x) y)
    (permp x (cons e y)))
  :hints (("Goal" :induct (permp x y)))
  :rule-classes ((:forward-chaining :trigger-terms ((permp (del e x) y)))))
other
(property permp-symmetric
  (x y :tl)
  :h (permp x y)
  :b (permp y x))
other
(property in-del
  (a b :all x :tl)
  :h (in a (del b x))
  :b (in a x)
  :rule-classes :forward-chaining)
other
(property permp-in
  (e :all x y :tl)
  :h (and (permp x y)
    (in e x))
  :b (in e y)
  :rule-classes ((:forward-chaining :match-free :all)))
other
(property del-del
  (a b :all x :tl)
  (== (del b (del a x))
    (del a (del b x))))
other
(property in-del2
  (a b :all x :tl)
  :h (and (!= a b)
    (in a x))
  :b (in a (del b x)))
other
(property permp-del
  (e :all x y :tl)
  :h (permp x y)
  :b (permp (del e x)
    (del e y)))
other
(property permp-reflexive
  (x :tl)
  (permp x x))
other
(property permp-transitive
  (x y z :tl)
  :h (and (permp x y)
    (permp y z))
  :b (permp x z)
  :rule-classes ((:forward-chaining :match-free :all)))