src/Pure/proofterm.ML
changeset 71532 82fbfccca7dd
parent 71531 50ac132a49bb
child 71533 d7175626d61e
equal deleted inserted replaced
71531:50ac132a49bb 71532:82fbfccca7dd
  1875     val (t, prf, cs, env, _) = make_constraints_cprf thy
  1875     val (t, prf, cs, env, _) = make_constraints_cprf thy
  1876       (Envir.empty (maxidx_proof cprf ~1)) cprf';
  1876       (Envir.empty (maxidx_proof cprf ~1)) cprf';
  1877     val cs' =
  1877     val cs' =
  1878       map (apply2 (Envir.norm_term env)) ((t, prop') :: cs)
  1878       map (apply2 (Envir.norm_term env)) ((t, prop') :: cs)
  1879       |> map (fn p => (true, p, Term.add_var_names (#1 p) (Term.add_var_names (#2 p) [])));
  1879       |> map (fn p => (true, p, Term.add_var_names (#1 p) (Term.add_var_names (#2 p) [])));
  1880     val env' = solve thy cs' env
  1880     val env' = solve thy cs' env;
  1881   in thawf (norm_proof env' prf) end handle MIN_PROOF () => MinProof;
  1881   in thawf (norm_proof env' prf) end handle MIN_PROOF () => MinProof;
  1882 
  1882 
  1883 fun prop_of_atom prop Ts =
  1883 fun prop_of_atom prop Ts =
  1884   subst_atomic_types (type_variables_of prop ~~ Ts) (forall_intr_variables_term prop);
  1884   subst_atomic_types (type_variables_of prop ~~ Ts) (forall_intr_variables_term prop);
  1885 
  1885 
  2053     val smashT = map_atyps smash;
  2053     val smashT = map_atyps smash;
  2054   in map_proof_terms (map_types smashT) smashT proof end;
  2054   in map_proof_terms (map_types smashT) smashT proof end;
  2055 
  2055 
  2056 fun standard_hidden_terms term proof =
  2056 fun standard_hidden_terms term proof =
  2057   let
  2057   let
  2058     fun add_not excl x =
  2058     fun add_unless excluded x =
  2059       ((is_Free x orelse is_Var x) andalso not (member (op =) excl x)) ? insert (op =) x;
  2059       ((is_Free x orelse is_Var x) andalso not (member (op =) excluded x)) ? insert (op =) x;
  2060     val visible = fold_aterms (add_not []) term [];
  2060     val visible = fold_aterms (add_unless []) term [];
  2061     val hidden = fold_proof_terms (fold_aterms (add_not visible)) proof [];
  2061     val hidden = fold_proof_terms (fold_aterms (add_unless visible)) proof [];
  2062     val dummy_term = Term.map_aterms (fn x =>
  2062     val dummy_term = Term.map_aterms (fn x =>
  2063       if member (op =) hidden x then Term.dummy_pattern (Term.fastype_of x) else x);
  2063       if member (op =) hidden x then Term.dummy_pattern (Term.fastype_of x) else x);
  2064   in proof |> not (null hidden) ? map_proof_terms dummy_term I end;
  2064   in proof |> not (null hidden) ? map_proof_terms dummy_term I end;
  2065 
  2065 
  2066 in
  2066 in