From 51a9b04e5419834e14942807a9e0935374d39659 Mon Sep 17 00:00:00 2001 From: matitaweb Date: Mon, 17 Oct 2011 09:12:35 +0000 Subject: [PATCH] commit by user andrea --- weblib/tutorial/chapter1.ma | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/weblib/tutorial/chapter1.ma b/weblib/tutorial/chapter1.ma index 6598df5c1..5da976a52 100644 --- a/weblib/tutorial/chapter1.ma +++ b/weblib/tutorial/chapter1.ma @@ -23,7 +23,8 @@ computational mechanism based on the declaration of inductive types. Let us start this tutorial with a simple example based on the following well known problem. -h2 class="section"The goat, the wolf and the cabbage/h2A farmer need to transfer a goat, a wolf and a cabbage across a river, but there +h2 class="section"The goat, the wolf and the cabbage/h2 +A farmer need to transfer a goat, a wolf and a cabbage across a river, but there is only one place available on his boat. Furthermore, the goat will eat the cabbage if they are left alone on the same bank, and similarly the wolf will eat the goat. The problem consists in bringing all three items safely across the @@ -211,11 +212,8 @@ of a relation (a binary predicate) over states. *) inductive move : a href="cic:/matita/tutorial/chapter1/state.ind(1,0,0)"state/a → a href="cic:/matita/tutorial/chapter1/state.ind(1,0,0)"state/a → Prop ≝ | move_goat: ∀g,g1,w,c. a href="cic:/matita/tutorial/chapter1/opp.ind(1,0,0)"opp/a g g1 → move (a href="cic:/matita/tutorial/chapter1/state.con(0,1,0)"mk_state/a g w c g) (a href="cic:/matita/tutorial/chapter1/state.con(0,1,0)"mk_state/a g1 w c g1) - (* Every time g and g1 are two opposite banks, it is legal to put - the state "a href="cic:/matita/tutorial/chapter1/state.con(0,1,0)"mk_state/a g w c g", which says that goat and boat are on the same bank g, - and the state "a href="cic:/matita/tutorial/chapter1/state.con(0,1,0)"mk_state/a g1 w c g1", which says that goat and boat are on the same bank g1 - in the relation "move" because, for example, moving the goat from bank g to bank g1 requires - moving the boat as well. *) + (* We can move the goat from a bank g to the opposite bank g1 if and only if the + boat is on the same bank g of the goat and we move the boat along with it. *) | move_wolf: ∀g,w,w1,c. a href="cic:/matita/tutorial/chapter1/opp.ind(1,0,0)"opp/a w w1 → move (a href="cic:/matita/tutorial/chapter1/state.con(0,1,0)"mk_state/a g w c w) (a href="cic:/matita/tutorial/chapter1/state.con(0,1,0)"mk_state/a g w1 c w1) | move_cabbage: ∀g,w,c,c1.a href="cic:/matita/tutorial/chapter1/opp.ind(1,0,0)"opp/a c c1 → move (a href="cic:/matita/tutorial/chapter1/state.con(0,1,0)"mk_state/a g w c c) (a href="cic:/matita/tutorial/chapter1/state.con(0,1,0)"mk_state/a g w c1 c1) | move_boat: ∀g,w,c,b,b1. a href="cic:/matita/tutorial/chapter1/opp.ind(1,0,0)"opp/a b b1 → move (a href="cic:/matita/tutorial/chapter1/state.con(0,1,0)"mk_state/a g w c b) (a href="cic:/matita/tutorial/chapter1/state.con(0,1,0)"mk_state/a g w c b1). -- 2.39.2