src/Pure/variable.ML
changeset 59646 48d400469bcb
parent 59645 f89464e9ffa0
child 59790 85c572d089fc
equal deleted inserted replaced
59645:f89464e9ffa0 59646:48d400469bcb
    17   val is_declared: Proof.context -> string -> bool
    17   val is_declared: Proof.context -> string -> bool
    18   val check_name: binding -> string
    18   val check_name: binding -> string
    19   val default_type: Proof.context -> string -> typ option
    19   val default_type: Proof.context -> string -> typ option
    20   val def_type: Proof.context -> bool -> indexname -> typ option
    20   val def_type: Proof.context -> bool -> indexname -> typ option
    21   val def_sort: Proof.context -> indexname -> sort option
    21   val def_sort: Proof.context -> indexname -> sort option
       
    22   val declare_maxidx: int -> Proof.context -> Proof.context
    22   val declare_names: term -> Proof.context -> Proof.context
    23   val declare_names: term -> Proof.context -> Proof.context
    23   val declare_constraints: term -> Proof.context -> Proof.context
    24   val declare_constraints: term -> Proof.context -> Proof.context
    24   val declare_term: term -> Proof.context -> Proof.context
    25   val declare_term: term -> Proof.context -> Proof.context
    25   val declare_typ: typ -> Proof.context -> Proof.context
    26   val declare_typ: typ -> Proof.context -> Proof.context
    26   val declare_prf: Proofterm.proof -> Proof.context -> Proof.context
    27   val declare_prf: Proofterm.proof -> Proof.context -> Proof.context
   205   end;
   206   end;
   206 
   207 
   207 val def_sort = Vartab.lookup o #2 o constraints_of;
   208 val def_sort = Vartab.lookup o #2 o constraints_of;
   208 
   209 
   209 
   210 
       
   211 (* maxidx *)
       
   212 
       
   213 val declare_maxidx = map_maxidx o Integer.max;
       
   214 
       
   215 
   210 (* names *)
   216 (* names *)
   211 
   217 
   212 fun declare_type_names t =
   218 fun declare_type_names t =
   213   map_names (fold_types (fold_atyps Term.declare_typ_names) t) #>
   219   map_names (fold_types (fold_atyps Term.declare_typ_names) t) #>
   214   map_maxidx (fold_types Term.maxidx_typ t);
   220   map_maxidx (fold_types Term.maxidx_typ t);