src/ZF/ex/Rmap.ML
changeset 496 3fc829fa81d2
parent 477 53fc8ad84b33
child 515 abcc438e7c27
equal deleted inserted replaced
495:612888a07889 496:3fc829fa81d2
     5 
     5 
     6 Inductive definition of an operator to "map" a relation over a list
     6 Inductive definition of an operator to "map" a relation over a list
     7 *)
     7 *)
     8 
     8 
     9 structure Rmap = Inductive_Fun
     9 structure Rmap = Inductive_Fun
    10  (val thy = List.thy |> add_consts [("rmap","i=>i",NoSyn)];
    10  (val thy 	 = List.thy |> add_consts [("rmap","i=>i",NoSyn)];
    11   val thy_name = "Rmap";
    11   val thy_name	 = "Rmap";
    12   val rec_doms = [("rmap", "list(domain(r))*list(range(r))")];
    12   val rec_doms	 = [("rmap", "list(domain(r))*list(range(r))")];
    13   val sintrs = 
    13   val sintrs	 = 
    14       ["<Nil,Nil> : rmap(r)",
    14       ["<Nil,Nil> : rmap(r)",
    15 
    15 
    16        "[| <x,y>: r;  <xs,ys> : rmap(r) |] ==> \
    16        "[| <x,y>: r;  <xs,ys> : rmap(r) |] ==> \
    17 \       <Cons(x,xs), Cons(y,ys)> : rmap(r)"];
    17 \       <Cons(x,xs), Cons(y,ys)> : rmap(r)"];
    18   val monos = [];
    18   val monos	 = [];
    19   val con_defs = [];
    19   val con_defs	 = [];
    20   val type_intrs = [domainI,rangeI] @ List.intrs @ [SigmaI]
    20   val type_intrs = [domainI,rangeI] @ List.intrs
    21   val type_elims = [SigmaE2]);
    21   val type_elims = []);
    22 
    22 
    23 goalw Rmap.thy Rmap.defs "!!r s. r<=s ==> rmap(r) <= rmap(s)";
    23 goalw Rmap.thy Rmap.defs "!!r s. r<=s ==> rmap(r) <= rmap(s)";
    24 by (rtac lfp_mono 1);
    24 by (rtac lfp_mono 1);
    25 by (REPEAT (rtac Rmap.bnd_mono 1));
    25 by (REPEAT (rtac Rmap.bnd_mono 1));
    26 by (REPEAT (ares_tac ([Sigma_mono, list_mono, domain_mono, range_mono] @ 
    26 by (REPEAT (ares_tac ([Sigma_mono, list_mono, domain_mono, range_mono] @