Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

型理論 なんて自分には関係ないと思っているあなたへ

9.481 Aufrufe

Veröffentlicht am

型理論の啓蒙

Veröffentlicht in: Technologie
  • My brother found Custom Writing Service ⇒ www.WritePaper.info ⇐ and ordered a couple of works. Their customer service is outstanding, never left a query unanswered.
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • Hi there! I just wanted to share a list of sites that helped me a lot during my studies: .................................................................................................................................... www.EssayWrite.best - Write an essay .................................................................................................................................... www.LitReview.xyz - Summary of books .................................................................................................................................... www.Coursework.best - Online coursework .................................................................................................................................... www.Dissertations.me - proquest dissertations .................................................................................................................................... www.ReMovie.club - Movies reviews .................................................................................................................................... www.WebSlides.vip - Best powerpoint presentations .................................................................................................................................... www.WritePaper.info - Write a research paper .................................................................................................................................... www.EddyHelp.com - Homework help online .................................................................................................................................... www.MyResumeHelp.net - Professional resume writing service .................................................................................................................................. www.HelpWriting.net - Help with writing any papers ......................................................................................................................................... Save so as not to lose
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • 基礎知識としてHaskellとTaPL勉強してね、という内容なので......
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • 面白いし大切なんだが、Coqとかの証明での「型」のニュアンスがLL含む運用されてる開発言語とちょっと違うカンジがしてしまうのがなんとも。まあ自分の理解不足だが。
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier

型理論 なんて自分には関係ないと思っているあなたへ

  1. 1. (Kinokkory@shiatsumat)
  2. 2. CintdoublecharT T*T const T
  3. 3. HaskellC++ /Java / Python
  4. 4. ↔↔
  5. 5. 1+1=?
  6. 6. 1+1=2
  7. 7. 112
  8. 8. “1” “ 1 ”“+” “”
  9. 9. “1” “2” “+” “=”
  10. 10. Coq
  11. 11. Inductive Nat:Set :=| O : Nat| S : Nat -> Nat.Nat (0 )S(1+)0, 1, 2, 3, ... O, S O,S (S O), S (S (S O)), ...
  12. 12. Fixpoint Plus(m n:Nat):Nat :=match m with| O => n| S m => S (Plus m n)end.Infix + := Plus.0+n=n,(1+m’)+n=1+(m’+n)
  13. 13. Theorem OnePlusOneEqualsTwo:S O + S O = S (S O).Proof.simpl.reflexivity.Qed.1+1=2
  14. 14. ......Lemma reduce_lemma :forall ctx (ctx : seq (term * typ)) t ty,typing ([seq Some p.2 | p <- ctx] ++ ctx) t ty ->Forall (fun p => reducible ctx p.1 p.2) ctx ->reducible ctx (substitute_seq 0 [seq p.1 | p <- ctx] t) ty.Proof.move => ctx ctx t ty; elim: t ty ctx ctx.- move => /= n ty ctx ctx.rewrite /substitute_seqv typvar_seqindex subn0 size_map shiftzero.elim: ctx n => [| c ctx IH []] /=.- move => n H _; rewrite nth_nil subn0.apply CR3 => //.- by constructor.- move => t H0; inversion H0.- by case => H [H0 H1]; rewrite H.- by move => n H [H0 H1]; apply IH.- move => tl IHtl tr IHtr ty ctx ctx H H0.inversion H; subst => {H}.case: (IHtl (tyfun ty1 ty) ctx ctx) => //= H1 H2; split; auto.apply typapp with ty1 => //.apply subject_substitute_seq => //.by rewrite drop0; move: H0; apply Forall_impl => p [].- move => t IHt ty ctx ctx H H0.inversion H; subst => {H} /=.apply abstraction_lemma.- constructor.apply subject_substitute_seq => //.by rewrite /= drop0; move: H0; apply Forall_impl => p [].- move => t2 ctx2 H H1.rewrite substitute_seq_cons_eq.apply (IHt ty2 ctx2 ((t2, ty1) :: ctx)) => /=.- move: H3; apply ctxleq_preserves_typing.move: H; apply (ctxleq_appl (Some ty1 :: _)).- split => //.move: H0; apply Forall_impl => p.by apply ctxleq_preserves_reducibility.Qed.Theorem typed_term_is_snorm : forall ctx t ty, typing ctx t ty ->SNorm t.Proof.move => ctx t ty H.apply (@CR1 ctx t ty).move: (@reduce_lemma ctx [::] t ty H) => /=.by rewrite substitute_seq_nil_eq; apply.Qed.
  15. 15. Theorem monad_bind_assoc: forall{t1 t2 t3:TypeWithEquality}(ma:TWE_Type (m t1))(k:TWE_Type (t1 -> m t2)%TypeWithEquality)(h:TWE_Type (t2 -> m t3)%TypeWithEquality),TWE_Equality (m t3)(AWE_Arrow (AWE_Arrow bindM ma)(Build_ArrowWithEquality (fun x => AWE_Arrow (AWE_Arrow bindM (AWE_Arrow k x)) h)(fun (x y : TWE_Type t1) (Hxy : TWE_Equality t1 x y) =>AWE_Compat bindM(AWE_Arrow k x)(AWE_Arrow k y)(AWE_Compat k x y Hxy)hh(Equivalence_Reflexive(Equivalence:=TWE_Equivalence _) h))))(AWE_Arrow (AWE_Arrow bindM (AWE_Arrow (AWE_Arrow bindM ma) k)) h).Proof.intros.intros x y H.unfold bindM,returnM; simpl.apply (AWE_Compat ma).simpl.intros x0 y0 H0.assert (HEql: TWE_Equality _ (AWE_Arrow k x0) (AWE_Arrow k y0)).apply (AWE_Compat k).apply H0.apply HEql.simpl.intros x1 y1 H1.assert (HEql2: TWE_Equality _ (AWE_Arrow h x1) (AWE_Arrow h y1)).apply (AWE_Compat h).apply H1.apply HEql2.apply H.Qed.End ContinuationMonadBase.Module FContinuationMonadBaseBase <:HasReturnType.Definition ReturnType : TypeWithEquality := TypeWithEquality_eq False.End FContinuationMonadBaseBase.Module FContinuationMonadBase := FContinuationMonadBaseBase <+ ContinuationMonadBase.Maybe
  16. 16. Coq

×