Combinatorics problem: you're arranging 10 people (A .. J) in a row. A and B must sit next to each other. How many arrangements? How could writing this problem as a program help scaffold the problem-solving process?
By axioms I actually mean inference rules. And it was something like: constant has_type : Expr → Typ → Prop axiom T_add : ∀ e1 e2 : Expr, (has_type e1 Typ.Num ∧ has_type e2 Typ.Num) → has_type (Expr.Add e1 e2) Typ.Num
-
-
When really you want to encode each rule within an inductive type. inductive has_type : Expr → Typ → Prop | T_add (e1 e2 : Expr) : has_type e1 Typ.Num → has_type e2 Typ.Num → has_type (Expr.Add e1 e2) Typ.Num Then given a proof of (has_type e tau), you can case on it.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
cognitive psychology. PhD
