src/ZF/func.ML
changeset 517 a9f93400f307
parent 485 5e00a676a211
child 519 98b88551e102
equal deleted inserted replaced
516:1957113f0d7d 517:a9f93400f307
    68 goalw ZF.thy [apply_def] "!!a b f. [| <a,b>: f;  f: Pi(A,B) |] ==> f`a = b";
    68 goalw ZF.thy [apply_def] "!!a b f. [| <a,b>: f;  f: Pi(A,B) |] ==> f`a = b";
    69 by (rtac the_equality 1);
    69 by (rtac the_equality 1);
    70 by (rtac apply_equality2 2);
    70 by (rtac apply_equality2 2);
    71 by (REPEAT (assume_tac 1));
    71 by (REPEAT (assume_tac 1));
    72 val apply_equality = result();
    72 val apply_equality = result();
       
    73 
       
    74 (*Applying a function outside its domain yields 0*)
       
    75 goalw ZF.thy [apply_def]
       
    76     "!!a b f. [| a ~: domain(f);  f: Pi(A,B) |] ==> f`a = 0";
       
    77 by (rtac the_0 1);
       
    78 by (fast_tac ZF_cs 1);
       
    79 val apply_0 = result();
    73 
    80 
    74 val prems = goal ZF.thy
    81 val prems = goal ZF.thy
    75     "[| f: Pi(A,B);   c: f;   !!x. [| x:A;  c = <x,f`x> |] ==> P  \
    82     "[| f: Pi(A,B);   c: f;   !!x. [| x:A;  c = <x,f`x> |] ==> P  \
    76 \    |] ==> P";
    83 \    |] ==> P";
    77 by (cut_facts_tac prems 1);
    84 by (cut_facts_tac prems 1);
   336 by (fast_tac (ZF_cs addIs [major RS apply_Pair]) 2);
   343 by (fast_tac (ZF_cs addIs [major RS apply_Pair]) 2);
   337 by (rtac (major RS PiE) 1);
   344 by (rtac (major RS PiE) 1);
   338 by (fast_tac ZF_cs 1);
   345 by (fast_tac ZF_cs 1);
   339 val domain_of_fun = result();
   346 val domain_of_fun = result();
   340 
   347 
       
   348 goal ZF.thy "!!f. [| f : Pi(A,B);  a: A |] ==> f`a : range(f)";
       
   349 by (etac (apply_Pair RS rangeI) 1);
       
   350 by (assume_tac 1);
       
   351 val apply_rangeI = result();
       
   352 
   341 val [major] = goal ZF.thy "f : Pi(A,B) ==> f : A->range(f)";
   353 val [major] = goal ZF.thy "f : Pi(A,B) ==> f : A->range(f)";
   342 by (rtac (major RS Pi_type) 1);
   354 by (rtac (major RS Pi_type) 1);
   343 by (etac (major RS apply_Pair RS rangeI) 1);
   355 by (etac (major RS apply_rangeI) 1);
   344 val range_of_fun = result();
   356 val range_of_fun = result();
   345 
   357 
   346 (*** Extensions of functions ***)
   358 (*** Extensions of functions ***)
   347 
   359 
   348 (*Singleton function -- in the underlying form of singletons*)
   360 (*Singleton function -- in the underlying form of singletons*)