src/HOL/NatDef.ML
changeset 3292 8b143c196d42
parent 3282 c31e6239d4c9
child 3308 da002cef7090
equal deleted inserted replaced
3291:cf322b5c59aa 3292:8b143c196d42
    68 by (rtac (refl RS disjI1) 1);
    68 by (rtac (refl RS disjI1) 1);
    69 by (Blast_tac 1);
    69 by (Blast_tac 1);
    70 qed "natE";
    70 qed "natE";
    71 
    71 
    72 (*Install 'automatic' induction tactic, pretending nat is a datatype *)
    72 (*Install 'automatic' induction tactic, pretending nat is a datatype *)
    73 (*except for induct_tac, everything is dummy*)
    73 (*except for induct_tac and exhaust_tac, everything is dummy*)
    74 datatypes := [("nat",{case_const = Bound 0, case_rewrites = [],
    74 datatypes := [("nat",{case_const = Bound 0, case_rewrites = [],
    75   constructors = [], induct_tac = nat_ind_tac,
    75   constructors = [], induct_tac = nat_ind_tac,
    76   exhaustion = natE, exhaust_tac = fn v => res_inst_tac [("n",v)] natE,
    76   exhaustion = natE,
       
    77   exhaust_tac = fn v => ALLNEWSUBGOALS (res_inst_tac [("n",v)] natE)
       
    78                                        (rotate_tac ~1),
    77   nchotomy = flexpair_def, case_cong = flexpair_def})];
    79   nchotomy = flexpair_def, case_cong = flexpair_def})];
    78 
    80 
    79 
    81 
    80 (*** Isomorphisms: Abs_Nat and Rep_Nat ***)
    82 (*** Isomorphisms: Abs_Nat and Rep_Nat ***)
    81 
    83