2008-05-01ãã1ã¶æéã®è¨äºä¸è¦§
ä¾ã¯ãforall (A B: Prop), A->(A->B)->Bãããã¯introsãããã¨ãA, A->B ⣠Bã¨ãªããããã¯coqã§ã¯èªåçã«è§£æ±ºã§ãããã®ã§ããã証ææ¦ç¥çã«ã¯ã->é¤å»ã§ããã http://adam.chlipala.net/itp/tactic-reference.html ã«ããã¨applyããç¶æ³ãªã®ã ããä»â¦
èæ¯ prologãµã³ãã«ã³ã¼ãããµã¨æ¸ãã¦ã¿ã - ã©ã·ã¦ã©ã§æ¸ãããã³ã¼ãã®ããã«ãæ®éã®(é¢æ°å)ããã°ã©ãã³ã°ã ã¨æ»ãå¤ã«çµæãè¿ããããªã³ã¼ãã«ãªãã¨ããã¯ã æ»ãå¤ã¨ãªãå¤æ°ããã©ã¡ã¼ã¿ã®æå¾ã«ç½®ã ãã®æ»ãå¤ãã©ã¡ã¼ã¿ããçµæã¨ãã¦ã©ã®ãâ¦
ããç¹æ§ãããã°ã©ã çã«å¤å¥ããã®ã«å¤±æããå ´åã以ä¸ã®äºã¤ã®ããã«å¤å®ã§ããã°ãæ£ããå¤å®æåã¨ããã å®éã«ã¯ãã®ç¹æ§ããããã®ããç¹æ§ããã¨å¤å¥ãã: æ£è§£ å®éã«ã¯ãã®ç¹æ§ããªããã®ããç¹æ§ãªãã¨å¤å¥ãã: æ£è§£ åæ§ã«å¤å®ã«å¤±æããå ´åâ¦
prologãµã³ãã«ã³ã¼ãããµã¨æ¸ãã¦ã¿ã - ã©ã·ã¦ã©ã§ã®prologã³ã¼ããeval.pl %% example %% consult(eval). %% eval(nil, apply(lambda(x, ref(x)), 10), Result). eval(Env, lambda(Arg, Body), closure(Env, Arg, Body)). eval(Env, apply(Operator, Operâ¦
ãªãã¨ãªããã³ã¼ãã¯SWI-Prologã§ãã§ãã¯ãããgranpa.pl father(ieyasu, hirotada). father(hirotada, kiyoyasu). granpa(GC, GP) :- father(GC, C), father(C, GP). granpa(ieyasu, X).ã§X=kiyoyasuã«ãªãã ããfact.pl fact(0, 1). fact(In, Result) :-â¦