monotonicity

A city-building and transport simulation game written in Lean

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
diff --git a/c/raylib_bindings.c b/c/raylib_bindings.c
index a869c03..141ff1f 100644
--- a/c/raylib_bindings.c
+++ b/c/raylib_bindings.c
@@ -572,3 +572,7 @@ lean_obj_res setWindowState(uint64_t flags) {
   SetWindowState(flags);
   return IO_UNIT;
 }
+
+uint64_t lean_uint64_ctz(uint64_t x) {
+    return __builtin_ctzll(x);
+}
diff --git a/lean/Raylean/Core.lean b/lean/Raylean/Core.lean
index b1aa7ac..eb95702 100644
--- a/lean/Raylean/Core.lean
+++ b/lean/Raylean/Core.lean
@@ -179,3 +179,6 @@ def vsyncHint : UInt64 := 0x00000040
 def windowHighdpi : UInt64 := 0x00002000
 
 end Flags
+
+@[extern "lean_uint64_ctz"]
+opaque _root_.UInt64.ctz (x : UInt64) : UInt64