This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | --Roughly based on https://github.com/Gabriel439/Haskell-Morte-Library/blob/master/src/Morte/Core.hs by Gabriel Gonzalez et al. | |
| data Expr = Star | Box | Var Int | Lam Int Expr Expr | Pi Int Expr Expr | App Expr Expr deriving (Show, Eq) | |
| subst v e (Var v') | v == v' = e | |
| subst v e (Lam v' ta b ) | v == v' = Lam v' (subst v e ta) b | |
| subst v e (Lam v' ta b ) = Lam v' (subst v e ta) (subst v e b ) | |
| subst v e (Pi v' ta tb) | v == v' = Pi v' (subst v e ta) tb | |
| subst v e (Pi v' ta tb) = Pi v' (subst v e ta) (subst v e tb) | |
| subst v e (App f a ) = App (subst v e f ) (subst v e a ) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ; -*- mode: scheme;-*- | |
| ; Implementation of resolution principle for first-order logic in Egison | |
| (define $unordered-pair | |
| (lambda [$m] | |
| (matcher | |
| {[<pair $ $> [m m] {[[$x $y] {[x y] [y x]}]}] | |
| [$ [something] {[$tgt {tgt}]}]}))) | |
| (define $positive? | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | module EightPuzzle where | |
| import Data.List (permutations) | |
| -- 参考記事:https://mathtrain.jp/8puzzle | |
| {-- | |
| 8 puzzle | |
| 1 2 3 | 
OlderNewer