SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Downloaden Sie, um offline zu lesen
べらべらAbella
@chiguri
ProofSummit2013
御清聴誠に感謝しております!
お前誰だよ
• 3月に無事博士号を
取得した元学生
• パンダ
–鶏付き
• 通称chiguri
• 今神奈川大学
御清聴誠に感謝しております!
明日のなごやちまつりで
• ぐだぐだとAgdaを話す予定
御清聴誠に感謝しております!
7月某日
• ML:「Abella2.0出たよ」
• chiguri:「ふうん・・・今度
調べよっと」
(結局ほとんど
調べてません)
御清聴誠に感謝しております!
数日後
• 「ProofSummitで話せ?」
• 「Yes, Sir!」
9割くらい
フィクションです
御清聴誠に感謝しております!
二つの偶然が重なり
• Abellaを話すことにした
– ちまつりでAgda話すし
–去年のCPPにも出てきたし
–ちょっと使ったことあるし
• 一応今も使ってる
• うまく話せるか分からないけど
御清聴誠に感謝しております!
今日の話の視点
• 主にCoqユーザから見た
Abella
–特にプログラミング側
• 2.0?なんの話ですかね。
御清聴誠に感謝しております!
Abellaって?
• http://abella-prover.org/
• ミネソタ大・INRIA Saclay・
Ecole Polytechniqueで開発
–実装はOCaml(OPAMで入る)
御清聴誠に感謝しております!
Abellaの原理
• 論理型プログラミング言語と
論理による証明器
–二段階論理(two-level logic)
–c.f. Coq/Agdaは関数型言語
» 構成的型理論とCurry-Howard対応って言わないとダメです?
御清聴誠に感謝しております!
Abellaの二段階論理
御清聴誠に感謝しております!
λ-Prolog
System G
Specification
Logic
Reasoning
Logic
今回の話は
御清聴誠に感謝しております!
λ-Prolog
System G
Specification
Logic
Reasoning
Logic
Specification Logic
• λ-Prologのサブセット
–もう少し詳しく言うと、
hereditary Harrop Formulaと
lambda-tree syntax
• だけどここでは説明しない
–目的はそこじゃない
–hereditary~は英語のwikipediaにある
御清聴誠に感謝しております!
Coqerから見たAbella
• 論理型言語だけど、慣れれば
大したことない
–少し覚えれば関数っぽく書ける
• Coqで意味をPropで書くようなもの
• 証明は慣れないが、そこはなん
とかする
–エラーメッセージもマニュアルもあま
り親切じゃない
御清聴誠に感謝しております!
Abellaのソース構成
• xxx.sig
–signature:型、コンストラクタ、
述語の型宣言
• xxx.mod
–module:述語の推論規則
• xxx.thm
–theorem:性質の証明
御清聴誠に感謝しております!
Abellaの型
• 型の宣言
–kind nat type.
• コンストラクタの宣言
–type z nat.
–type s nat -> nat.
• 名称の最初は大文字不可
御清聴誠に感謝しております!
注意
• 型は代数的データ構造とほぼ
同じだが、構造帰納法は使え
ない
–その場合「natである」という述語
を作る必要がある
• 原則として「述語に関する帰納法」
しか使えない
御清聴誠に感謝しております!
Abellaの述語
• 述語の型:
引数 -> 引数 -> ... -> o
• oが命題を表す型
–o ≈ CoqにおけるProp
• Reasoning logicではpropという型が
–引数を与えると命題として使える
御清聴誠に感謝しております!
例えばこんな
• シグネチャ
–type is_nat nat -> o.
–type even nat -> bool -> o.
• 推論
–is_nat z.
–is_nat (s N) :- is_nat N.
御清聴誠に感謝しております!
特徴を二つ
• 資料作成のやる気時間の問題
• Coqerがうらやましいなあ、
と思うやつ
御清聴誠に感謝しております!
特徴1
• 高階抽象構文(HOAS)が
使える
–Isabelleユーザは知ってるはず
• Isabelle/HOLで使えるらしい
–CoqやAgdaでは不可能
• Positivity conditionに引っかかる
• Parametric HOASがあるにはあるが、あの
使いにくさときたら・・・ぶつぶつ
御清聴誠に感謝しております!
HOAS
• 表現したい言語の変数を使っ
ている言語の変数で表す
–例:ラムダ計算の変数をλ-Prolog
の変数で表現
御清聴誠に感謝しております!
ラムダ計算を言語で
表現するとき
• 変数どうしよう?
–頭の痛い問題の一つ
–文字列?
–自然数?
• de Bruijn index?
• 束縛関係や置き換えの面倒く
ささがエラーとつらみを誘う
御清聴誠に感謝しております!
ラムダ式の束縛
• λx. xを考えると、ほしいのは
–λの後のxと後ろのxが関係する
–置換するときは後ろのxが置き換え
られる
–画面出力?置いておいてください。
御清聴誠に感謝しております!
じゃあ
• fun x : term => x
–termはλ項とする
–型はterm -> term
• 何かλ項を与えるとそれがそのまま返っ
てくる
• 一応ラベルとしてコンストラク
タを使用する
–lam (fun x : term => x)
御清聴誠に感謝しております!
λ項の定義
• 適用
–app : term * term -> term
• 抽象
–lam : (term -> term) -> term
• 以上!
御清聴誠に感謝しております!
λ-Prologでは
• 適用しか書かない・・・
–不思議とどの例を見ても抽象が見
あたらない
–多分書ける・・・はず・・・
御清聴誠に感謝しております!
HOASは
• 別にラムダ式には限らない
–変数束縛を記述言語に任せるのが本
質
–局所変数などを表現するのも可能
• 言語などの表現に限る気はする
御清聴誠に感謝しております!
特徴2
• 推論、終わらなくてもいいよ
• えっ
御清聴誠に感謝しております!
お馬鹿なeven
• even z t.
• even (s N) B :- odd N B.
• odd z f.
• odd N B :- even (s N) B
• 1より大きい自然数で推論不能
–お馬鹿なのはoddだけど
御清聴誠に感謝しております!
evenと何かの
乗算結果はeven
• お馬鹿なevenでもこれが証明
できる
–証明が変なのだが
• 普通なら、「同じ値を二回足したら
偶数」などの補題が必要
• 0のケースしか出ない
御清聴誠に感謝しております!
どういうことか
• 推論が仮定にある
• 推論ができる
御清聴誠に感謝しております!
つまり
• even N tという仮定がある
としたら、
–推論が終わって
–判定がtとなる
–そんなNだった
• ということ
–そうじゃないNなんて知らない
御清聴誠に感謝しております!
全域性
• forall N, {is_nat N} ->
exists B, {is_bool B} ->
{even N B}
– 「全ての入力(と思ってる変数)に対して出
力(と思ってる何か)が存在する」
• これだけでは必ず停止するとも一意になるとも
言っていないが
– is_natに関する帰納法を用いて証明する
• existsの位置を間違えると帰納法が使えないの
で注意
• is_bool忘れたら証明が進まないのでさらに注意
御清聴誠に感謝しております!
今日の話はこんなところ
御清聴誠に感謝しております!
他にも
• Reasoning Logicの側では
nabla-quantifierという面白い
ものも
–常に「今まで出てきた値と異な
る」ものを表す
• Lispのgensymみたいなことができる
御清聴誠に感謝しております!
2.0何が変わった?
• 高階仕様がサポートされたよ
• 文脈依存の命題の証明が変わっ
たよ
• 日本語でおk(特に後者)
• アナウンス英語ですけどね
• 例がexamplesのどこかにある(だけ)
らしいのだが始めて5分であきらめた
御清聴誠に感謝しております!
Abellaでやってること
• 昔(といっても二年前)作っ
た計算の合流性の証明
–HOAS便利すぐる
–Complete Developmentという
手法を使おうとしているが・・・
• parallel betaの証明時に面倒なこと
を回避
御清聴誠に感謝しております!

Weitere ähnliche Inhalte

Empfohlen

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Empfohlen (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

ProofSummit2013 べらべらAbella