Tool Examples
---------------------------------------------------------

This directory contains examples against which the tool
can be run. The examples are split into two directories:

  - vsia_examples  - examples from Variant-Based
                     Satisfiability in Initial Algebas
  - other_examples - other examples

All of the modules used in the examples are in the:

  - mod_files

directory. They are imported in the correct order via:

  - examples.maude

file. Every example file in the two directories imports
this file before running the example. To run any of the
example files, just type the following:

  - maude example_directory/example_name

Variant-Based Satisfiability in Initial Algebras Examples
---------------------------------------------------------

This file lists all of the examples from the paper
Variant-Based Satisfiability in Initial Algebras.
These examples will be useful for testing the tool.

- Example 1: zero? - simple variant unifiers fail to capture correct notion
- Example 2: zero? - has 2 constructor variant and 2 constructor unifiers
- Example 3: sign 0, s, _+_ (with rules n+0=n and n+s(m)=s(n+m)) doesn't have
             FVP but we can still compute its constructor variants by hand
- Example 4: sign 0, s (with rule ss0=0) cannot be solved with just constructor
             variants, because constructor terms are not in normal form
- Example 5:    OS ACU Nats - with NzNat and Nat
  Theorem:      n = 0 \/ n + n != n
- Example 6:    zero? - is unsatisfiable if ctor unifiers are used
- Example 7:    OS ACU Nats + monus
  Theorem:      n - m = 0 \/ m - n = 0
- Example 8:    Int Off. - sign 0, s, p (with s,p both ctors and defined)
  Theorem:      s(x) = s(y) => x = y
- Example 9:    Int ACU - Example 5. + Int. Sorts
  Theorem:      i + j = i + l => j = l
- Example 10:   Parameterized Lists
  Theorem:      head(l);tail(l) = l (for l non-empty list)
- Example 11:   Compact Lists
- Example 12:   Multisets
  Theorem:      (x in M /\ M = y,M' /\ x != y) => x in M'
- Example 13:   Sets
  Thoerem:      (x in y,S /\ x != y) => x in S
- Example 14:   HFSets
  Theorem:      Ext:  (U subset V /\ V subset U) => U = V
                Pair: x in {S,S'} <=> (x in S or x in S')
                Ext. Ordered. Pairs {x,{x,y}} = {x',{x',y'}} => (x = x' /\ y = y')
                Finite Union Axiom: x in (S U S') <=> (x in S \/ x in S')
                Membership: x in S <=> S = (S U {x})
                Associativity, commutativity, idempotency of U
- Example 15:   Nats Pres Arithmetic - Example 5 + (>) - not OS compact
  Theorem:      Trichotomy: m > n \/ n > m \/ m = n
- Example 15.5: HFSets of Lists of Presburger Nats
  Satisfiable:  head(l) > head(l') /\ head(l) not > 1 + 1 + 1 /\ {(1 + 1); nil} not subset {l,l'}
- Example 16:   Int Pres Arithmetic - not OS compact
  Theorem:      Trichotomy law with ints
- Example 17:   Nat Pres Arithmetic with (>) boolean-valued - OS compact
  Theorem:      Transitivity of (>) for nats
- Example 18:   Int Pres Arithmetic with (>) boolean-valued - OS compact
  Theorem:      Transitivity of (>) for ints

-------------------------------------------------------------------------------

Examples 1-4 do not invoke the variant satisfiability algorithm.
Examples 5-10, 12, and 17-18 directly have OS-compact subtheories and
no additional proof obligations, so we can directly use these examples.
