src/HOL/Tools/Qelim/cooper.ML
changeset 54489 03ff4d1e6784
parent 52131 366fa32ee2a3
child 54742 7a86358a3c0b
equal deleted inserted replaced
54488:b60f1fab408c 54489:03ff4d1e6784
    40    @{term "Ex :: (int => _) => _"}, @{term "Ex :: (nat => _) => _"},
    40    @{term "Ex :: (int => _) => _"}, @{term "Ex :: (nat => _) => _"},
    41    @{term "All :: (int => _) => _"}, @{term "All :: (nat => _) => _"},
    41    @{term "All :: (int => _) => _"}, @{term "All :: (nat => _) => _"},
    42    @{term "nat"}, @{term "int"},
    42    @{term "nat"}, @{term "int"},
    43    @{term "Num.One"}, @{term "Num.Bit0"}, @{term "Num.Bit1"},
    43    @{term "Num.One"}, @{term "Num.Bit0"}, @{term "Num.Bit1"},
    44    @{term "Num.numeral :: num => int"}, @{term "Num.numeral :: num => nat"},
    44    @{term "Num.numeral :: num => int"}, @{term "Num.numeral :: num => nat"},
    45    @{term "Num.neg_numeral :: num => int"},
       
    46    @{term "0::int"}, @{term "1::int"}, @{term "0::nat"}, @{term "1::nat"},
    45    @{term "0::int"}, @{term "1::int"}, @{term "0::nat"}, @{term "1::nat"},
    47    @{term "True"}, @{term "False"}];
    46    @{term "True"}, @{term "False"}];
    48 
    47 
    49 structure Data = Generic_Data
    48 structure Data = Generic_Data
    50 (
    49 (
   608   | num_of_term vs (Term.Bound i) = Proc.Bound (Proc.nat_of_integer i)
   607   | num_of_term vs (Term.Bound i) = Proc.Bound (Proc.nat_of_integer i)
   609   | num_of_term vs @{term "0::int"} = Proc.C (Proc.Int_of_integer 0)
   608   | num_of_term vs @{term "0::int"} = Proc.C (Proc.Int_of_integer 0)
   610   | num_of_term vs @{term "1::int"} = Proc.C (Proc.Int_of_integer 1)
   609   | num_of_term vs @{term "1::int"} = Proc.C (Proc.Int_of_integer 1)
   611   | num_of_term vs (t as Const (@{const_name numeral}, _) $ _) =
   610   | num_of_term vs (t as Const (@{const_name numeral}, _) $ _) =
   612       Proc.C (Proc.Int_of_integer (dest_number t))
   611       Proc.C (Proc.Int_of_integer (dest_number t))
   613   | num_of_term vs (t as Const (@{const_name neg_numeral}, _) $ _) =
       
   614       Proc.Neg (Proc.C (Proc.Int_of_integer (dest_number t)))
       
   615   | num_of_term vs (Const (@{const_name Groups.uminus}, _) $ t') =
   612   | num_of_term vs (Const (@{const_name Groups.uminus}, _) $ t') =
   616       Proc.Neg (num_of_term vs t')
   613       Proc.Neg (num_of_term vs t')
   617   | num_of_term vs (Const (@{const_name Groups.plus}, _) $ t1 $ t2) =
   614   | num_of_term vs (Const (@{const_name Groups.plus}, _) $ t1 $ t2) =
   618       Proc.Add (num_of_term vs t1, num_of_term vs t2)
   615       Proc.Add (num_of_term vs t1, num_of_term vs t2)
   619   | num_of_term vs (Const (@{const_name Groups.minus}, _) $ t1 $ t2) =
   616   | num_of_term vs (Const (@{const_name Groups.minus}, _) $ t1 $ t2) =