Giter VIP home page Giter VIP logo

lean4-maze's Issues

Last maze triggers simp heartbeat error

Hello! I was playing around a bit after today's talk and tried to bored-ly solve the long maze just to pass some time.

I'm not sure if there's anything to fix really, but just to note, if you do:

example : can_escape maze3 :=
 by west
    west
    west
    south
    south
    south
    south
    east
    east
    north
    north
    east
    east
    south
    south
    south
    south
    south
    south
    south
    south
    west
    west
    west
    west
    west
    west
    west
    west
    west
    west
    west
    west
    west
    west
    west
    west
    west
    west
    west
    west
    west
    west
    west
    north
    north
    north
    north
    north
    north
    north
    north
    east
    east
    south
    south
    south
    south
    south
    south
    east
    east
    east
    east
    north
    north
    north
    north
    east
    east
    east
    north
    north
    east
    east
    east
    east
    east
    east

the last east says cannot move east, even though clearly you can from the picture.

The issue seems to be simp failing -- if I apply step_east and then simp, the infoview says:

▶ 473:5-473:9: error:
tactic 'simp' failed, nested error:
(deterministic) timeout at 'simp', maximum number of heartbeats (200000) has been reached (use 'set_option maxHeartbeats <num>' to set the limit)

and indeed set_option maxHeartbeats 999999999 fixes the issue (lets me east).

Not sure as I say that there's anything that needs tweaking, I take it changing the default globally is silly, but yeah just sharing :)

Thanks for the fun.

unable to update to lean nightly 2021-11-25

This works in nightly 2021-11-24:

def maze1 := ┌───┐
             │▓▓▓│
             │░@▓│
             │▓▓▓│
             └───┘

example : can_escape maze1 := by
  apply step_west
  simp
  out

but in 2021-11-25, the simp step errors out with:

application type mismatch
  Eq.ndrec
    (Eq.refl
      (update_state_with_row_aux 0 (0 + 1) [CellContents.wall, CellContents.wall]
          (game_state_from_cells_aux { x := 3, y := 3 } (0 + 1)
            [[CellContents.empty, CellContents.player, CellContents.wall],
              [CellContents.wall, CellContents.wall, CellContents.wall]])).position)
argument has type
  (update_state_with_row_aux 0 (0 + 1) [CellContents.wall, CellContents.wall]
        (game_state_from_cells_aux { x := 3, y := 3 } (0 + 1)
          [[CellContents.empty, CellContents.player, CellContents.wall],
            [CellContents.wall, CellContents.wall, CellContents.wall]])).position =
    (update_state_with_row_aux 0 (0 + 1) [CellContents.wall, CellContents.wall]
        (game_state_from_cells_aux { x := 3, y := 3 } (0 + 1)
          [[CellContents.empty, CellContents.player, CellContents.wall],
            [CellContents.wall, CellContents.wall, CellContents.wall]])).position
but function has type
  (fun s =>
        (update_state_with_row_aux 0 (0 + 1) [CellContents.wall, CellContents.wall]
                (game_state_from_cells_aux { x := 3, y := 3 } (0 + 1)
                  [[CellContents.empty, CellContents.player, CellContents.wall],
                    [CellContents.wall, CellContents.wall, CellContents.wall]])).position.2 =
          s.2)
      (update_state_with_row_aux 0 (0 + 1) [CellContents.wall, CellContents.wall]
          (game_state_from_cells_aux { x := 3, y := 3 } (0 + 1)
            [[CellContents.empty, CellContents.player, CellContents.wall],
              [CellContents.wall, CellContents.wall, CellContents.wall]])).position →
    ∀ {b : Coords},
      (update_state_with_row_aux 0 (0 + 1) [CellContents.wall, CellContents.wall]
              (game_state_from_cells_aux { x := 3, y := 3 } (0 + 1)
                [[CellContents.empty, CellContents.player, CellContents.wall],
                  [CellContents.wall, CellContents.wall, CellContents.wall]])).position =
          b →
        (fun s =>
            (update_state_with_row_aux 0 (0 + 1) [CellContents.wall, CellContents.wall]
                    (game_state_from_cells_aux { x := 3, y := 3 } (0 + 1)
                      [[CellContents.empty, CellContents.player, CellContents.wall],
                        [CellContents.wall, CellContents.wall, CellContents.wall]])).position.2 =
              s.2)

One of these commits must be to blame:
leanprover/lean4@9a939f9
leanprover/lean4@f7decd2
leanprover/lean4@17f99e3
leanprover/lean4@292d321
leanprover/lean4@a8f4146

On a cursory glance, the last one seems most suspicious to me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.