# Set assumption to symbolic variable

**URL:** https://discourse.julialang.org/t/set-assumption-to-symbolic-variable/67569
**Category:** New to Julia
**Tags:** modelingtoolkit
**Created:** [September 2, 2021, 12:08pm UTC](https://discourse.julialang.org/t/set-assumption-to-symbolic-variable/67569 "2021-09-02T12:08:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![vinicius\_de\_lima](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vinicius_de_lima/32/28717_2.png) [@vinicius\_de\_lima](https://discourse.julialang.org/u/vinicius_de_lima)
#### Post date: [September 2, 2021, 12:08pm UTC](https://discourse.julialang.org/t/set-assumption-to-symbolic-variable/67569/1 "2021-09-02T12:08:59Z")

</div>

There is a way to assume a symbolic variable as an natural number using ModelingToolkit.jl? I’m trying to raise an 2x2 matrix to an natural number as follows:

```julia
using LinearAlgebra
using ModelingToolkit

@variables n

A = [4.5 8.0;-2.0 -3.5]^n 

```

Which returns the error:

```julia

MethodError: no method matching isinteger(::Num)
Closest candidates are:
  isinteger(!Matched::Integer) at number.jl:20
  isinteger(!Matched::Complex) at complex.jl:134
  isinteger(!Matched::Rational) at rational.jl:265
  ...
in eval at base/boot.jl:360 
in top-level scope at Lista_03_FM223_Vinicius_de_Souza_Lima.jl:7
in ^ at stdlib/v1.6/LinearAlgebra/src/dense.jl:499

```

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [September 2, 2021, 12:41pm UTC](https://discourse.julialang.org/t/set-assumption-to-symbolic-variable/67569/2 "2021-09-02T12:41:02Z")

</div>

`@variables n::Int` is what it will be. But the system is not complete.
