==========================================
reduce in META-LEVEL : upImports('META-LEVEL) .
rewrites: 1
result ImportList: protecting 'META-VIEW .
protecting 'BOUND .
==========================================
reduce in META-LEVEL : upImports('BAR) .
rewrites: 1
result ImportList: including 'BOOL .
including 'FOO * (
  sort 'Foo to 'Baz,
  op 'a to 'b [none]
) .
==========================================
reduce in META-LEVEL : upImports('BAR') .
rewrites: 1
result ImportList: including 'BOOL .
including 'FOO' * (
  sort 'Foo to 'Quux,
  op '_+_ : 'Baz 'Baz -> 'Foo to '_._ [prec(27) gather('E 'e)],
  op '_+_ : 'Foo 'Foo -> 'Foo to '_*_ [prec(29) gather('E 'e)]
) .
==========================================
reduce in META-LEVEL : upImports('BAZ) .
rewrites: 1
result ImportList: including 'BOOL .
including 'NAT + 'FOO' * (
  sort 'Foo to 'Quux,
  label 'a to 'b,
  op '_+_ : 'Baz 'Baz -> 'Foo to '_._ [prec(27) gather('E 'e)],
  op '_+_ : 'Foo 'Foo -> 'Foo to '_*_ [prec(29) format('s 's 's 's)]
) .
==========================================
reduce in META-LEVEL : upModule('BAZ, false) .
rewrites: 1
result FModule: fmod 'BAZ is
  including 'BOOL .
  including 'NAT + 'FOO' * (
    sort 'Foo to 'Quux,
    label 'a to 'b,
    op '_+_ : 'Baz 'Baz -> 'Foo to '_._ [prec(27) gather('E 'e)],
    op '_+_ : 'Foo 'Foo -> 'Foo to '_*_ [prec(29) format('s 's 's 's)]
  ) .
  sorts none .
  none
  none
  none
  none
endfm
==========================================
reduce in META-LEVEL : upModule('BAZ, true) .
rewrites: 1
result FModule: fmod 'BAZ is
  nil
  sorts 'Bar ; 'Baz ; 'Bool ; 'Nat ; 'NzNat ; 'Quux ; 'Zero .
  subsort 'NzNat < 'Nat .
  subsort 'Quux < 'Bar .
  subsort 'Zero < 'Nat .
  op '0 : nil -> 'Zero [ctor] .
  op '_&_ : 'Nat 'Nat -> 'Nat [assoc comm prec(53) special(
    id-hook('ACU_NumberOpSymbol, '&) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op '_*_ : 'Nat 'Nat -> 'Nat [assoc comm prec(31) special(
    id-hook('ACU_NumberOpSymbol, '*) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op '_*_ : 'NzNat 'NzNat -> 'NzNat [assoc comm prec(31) special(
    id-hook('ACU_NumberOpSymbol, '*) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op '_*_ : 'Quux 'Quux -> 'Quux [assoc comm prec(29) format('s 's 's 's)] .
  op '_+_ : 'Nat 'Nat -> 'Nat [assoc comm prec(33) special(
    id-hook('ACU_NumberOpSymbol, '+) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op '_+_ : 'NzNat 'Nat -> 'NzNat [assoc comm prec(33) special(
    id-hook('ACU_NumberOpSymbol, '+) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op '_._ : 'Baz 'Baz -> 'Quux [prec(27) gather('E 'e)] .
  op '_<<_ : 'Nat 'Nat -> 'Nat [prec(35) gather('E 'e) special(
    id-hook('NumberOpSymbol, '<<) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op '_<=_ : 'Nat 'Nat -> 'Bool [prec(37) special(
    id-hook('NumberOpSymbol, '<=) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat) 
    term-hook('trueTerm, 'true.Bool) 
    term-hook('falseTerm, 'false.Bool))] .
  op '_<_ : 'Nat 'Nat -> 'Bool [prec(37) special(
    id-hook('NumberOpSymbol, '<) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat) 
    term-hook('trueTerm, 'true.Bool) 
    term-hook('falseTerm, 'false.Bool))] .
  op '_=/=_ : 'Universal 'Universal -> 'Bool [prec(51) poly(1 2) special(
    id-hook('EqualitySymbol, nil) 
    term-hook('equalTerm, 'false.Bool) 
    term-hook('notEqualTerm, 'true.Bool))] .
  op '_==_ : 'Universal 'Universal -> 'Bool [prec(51) poly(1 2) special(
    id-hook('EqualitySymbol, nil) 
    term-hook('equalTerm, 'true.Bool) 
    term-hook('notEqualTerm, 'false.Bool))] .
  op '_>=_ : 'Nat 'Nat -> 'Bool [prec(37) special(
    id-hook('NumberOpSymbol, '>=) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat) 
    term-hook('trueTerm, 'true.Bool) 
    term-hook('falseTerm, 'false.Bool))] .
  op '_>>_ : 'Nat 'Nat -> 'Nat [prec(35) gather('E 'e) special(
    id-hook('NumberOpSymbol, '>>) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op '_>_ : 'Nat 'Nat -> 'Bool [prec(37) special(
    id-hook('NumberOpSymbol, '>) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat) 
    term-hook('trueTerm, 'true.Bool) 
    term-hook('falseTerm, 'false.Bool))] .
  op '_^_ : 'Nat 'Nat -> 'Nat [prec(29) gather('E 'e) special(
    id-hook('NumberOpSymbol, '^) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op '_^_ : 'NzNat 'Nat -> 'NzNat [prec(29) gather('E 'e) special(
    id-hook('NumberOpSymbol, '^) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op '_and_ : 'Bool 'Bool -> 'Bool [assoc comm prec(55)] .
  op '_divides_ : 'NzNat 'Nat -> 'Bool [prec(51) special(
    id-hook('NumberOpSymbol, 'divides) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat) 
    term-hook('trueTerm, 'true.Bool) 
    term-hook('falseTerm, 'false.Bool))] .
  op '_implies_ : 'Bool 'Bool -> 'Bool [prec(61) gather('e 'E)] .
  op '_or_ : 'Bool 'Bool -> 'Bool [assoc comm prec(59)] .
  op '_quo_ : 'Nat 'NzNat -> 'Nat [prec(31) gather('E 'e) special(
    id-hook('NumberOpSymbol, 'quo) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op '_rem_ : 'Nat 'NzNat -> 'Nat [prec(31) gather('E 'e) special(
    id-hook('NumberOpSymbol, 'rem) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op '_xor_ : 'Bool 'Bool -> 'Bool [assoc comm prec(57)] .
  op '_xor_ : 'Nat 'Nat -> 'Nat [assoc comm prec(55) special(
    id-hook('ACU_NumberOpSymbol, 'xor) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op '_|_ : 'Nat 'Nat -> 'Nat [assoc comm prec(57) special(
    id-hook('ACU_NumberOpSymbol, '|) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op '_|_ : 'NzNat 'Nat -> 'NzNat [assoc comm prec(57) special(
    id-hook('ACU_NumberOpSymbol, '|) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op 'a : nil -> 'Baz [none] .
  op 'false : nil -> 'Bool [ctor special(
    id-hook('SystemFalse, nil))] .
  op 'gcd : 'Nat 'Nat -> 'Nat [assoc comm special(
    id-hook('ACU_NumberOpSymbol, 'gcd) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op 'gcd : 'NzNat 'Nat -> 'NzNat [assoc comm special(
    id-hook('ACU_NumberOpSymbol, 'gcd) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op 'if_then_else_fi : 'Bool 'Universal 'Universal -> 'Universal [poly(2 3 0)
    special(
    id-hook('BranchSymbol, nil) 
    term-hook('1, 'true.Bool) 
    term-hook('2, 'false.Bool))] .
  op 'lcm : 'Nat 'Nat -> 'Nat [assoc comm special(
    id-hook('ACU_NumberOpSymbol, 'lcm) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op 'lcm : 'NzNat 'NzNat -> 'NzNat [assoc comm special(
    id-hook('ACU_NumberOpSymbol, 'lcm) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op 'max : 'Nat 'Nat -> 'Nat [assoc comm special(
    id-hook('ACU_NumberOpSymbol, 'max) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op 'max : 'NzNat 'Nat -> 'NzNat [assoc comm special(
    id-hook('ACU_NumberOpSymbol, 'max) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op 'min : 'Nat 'Nat -> 'Nat [assoc comm special(
    id-hook('ACU_NumberOpSymbol, 'min) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op 'min : 'NzNat 'NzNat -> 'NzNat [assoc comm special(
    id-hook('ACU_NumberOpSymbol, 'min) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op 'modExp : '`[Nat`] '`[Nat`] '`[Nat`] -> '`[Nat`] [special(
    id-hook('NumberOpSymbol, 'modExp) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op 'not_ : 'Bool -> 'Bool [prec(53)] .
  op 's_ : 'Nat -> 'NzNat [iter ctor special(
    id-hook('SuccSymbol, nil) 
    term-hook('zeroTerm, '0.Zero))] .
  op 'sd : 'Nat 'Nat -> 'Nat [comm special(
    id-hook('CUI_NumberOpSymbol, 'sd) 
    op-hook('succSymbol, 's_, 'Nat, 'NzNat))] .
  op 'true : nil -> 'Bool [ctor special(
    id-hook('SystemTrue, nil))] .
  none
  eq '_and_['A:Bool, 'A:Bool] = 'A:Bool [none] .
  eq '_and_['A:Bool, '_xor_['B:Bool, 'C:Bool]] = '_xor_['_and_['A:Bool,
    'B:Bool], '_and_['A:Bool, 'C:Bool]] [none] .
  eq '_and_['false.Bool, 'A:Bool] = 'false.Bool [none] .
  eq '_and_['true.Bool, 'A:Bool] = 'A:Bool [none] .
  eq '_implies_['A:Bool, 'B:Bool] = 'not_['_xor_['A:Bool, '_and_['A:Bool,
    'B:Bool]]] [none] .
  eq '_or_['A:Bool, 'B:Bool] = '_xor_['_and_['A:Bool, 'B:Bool], '_xor_['A:Bool,
    'B:Bool]] [none] .
  eq '_xor_['A:Bool, 'A:Bool] = 'false.Bool [none] .
  eq '_xor_['false.Bool, 'A:Bool] = 'A:Bool [none] .
  eq 'not_['A:Bool] = '_xor_['true.Bool, 'A:Bool] [none] .
endfm
Bye.
