Ask Your Question

Jingenbl's profile - activity

2022-12-31 15:26:33 +0200 received badge  Popular Question (source)
2021-10-10 14:25:34 +0200 received badge  Notable Question (source)
2021-07-06 01:29:52 +0200 received badge  Nice Question (source)
2021-01-27 19:27:39 +0200 received badge  Popular Question (source)
2020-07-31 10:22:10 +0200 commented answer lambda calculus

Thank you for this link which I will examine carefully. But I was rather thinking of a possibility of handling lambda terms, of developing a beat-reduction, all these complicated things to experiment with by hand ...

2020-07-30 17:39:02 +0200 asked a question lambda calculus

Is there an implementation of lambda-calculus with sagemath (or python)?

thanks in advance

2020-01-27 16:04:20 +0200 answered a question power_mod strange...

thank you so much. I will study this more closely

2020-01-27 11:01:37 +0200 asked a question power_mod strange...

where is the error?

x = 15

z = power_mod(x,3,23) #z=15^3 mod 23

inverse = inverse_mod(3,23) #1/3 mod 23

assert mod(3*inverse,23)==1 #ok

y = power_mod(z,inverse,23) # y = 15^(3/3) = 15

print(y)

18

Thanks a lot to everyone

2020-01-01 16:16:21 +0200 answered a question How to get the canonical prime factorization, with zero exponents too

something like this:

facteurs = list((410767).factor())
print(facteurs)

[(7, 2), (83, 1), (101, 1)]

solution = facteurs
deja =[p for p,e in facteurs]
for premier in primes(facteurs[0][0]+1,stop=facteurs[-1][0]):
        if premier not in deja:
            solution.append((premier,0))
print(solution)

[(7, 2), (83, 1), (101, 1), (11, 0), (13, 0), (17, 0), (19, 0), (23, 0), (29, 0), (31, 0), (37, 0), (41, 0), (43, 0), (47, 0), (53, 0), (59, 0), (61, 0), (67, 0), (71, 0), (73, 0), (79, 0), (89, 0), (97, 0)]

happy new year

2020-01-01 16:11:28 +0200 received badge  Commentator
2020-01-01 16:11:28 +0200 commented question How to get the canonical prime factorization, with zero exponents too

something like this:

facteurs = list((410767).factor())

print(facteurs)

[(7, 2), (83, 1), (101, 1)]

solution = facteurs

deja =[p for p,e in facteurs]

for premier in primes(facteurs[0][0]+1,stop=facteurs[-1][0]):

if premier not in deja:

    solution.append((premier,0))

print(solution)

[(7, 2), (83, 1), (101, 1), (11, 0), (13, 0), (17, 0), (19, 0), (23, 0), (29, 0), (31, 0), (37, 0), (41, 0), (43, 0), (47, 0), (53, 0), (59, 0), (61, 0), (67, 0), (71, 0), (73, 0), (79, 0), (89, 0), (97, 0)]

happy new year

2020-01-01 10:20:30 +0200 commented answer Using piecewise-defined functions for recursive integer sequence

define F(x)=10(x%n)

so n(k)=F(F(F....(F(r//m)...) with k iterations.

What do you mean by a piecewise function , when the function is defined for three variables k, r and m ?

happy new year

2020-01-01 09:48:08 +0200 commented answer Using piecewise-defined functions for recursive integer sequence

it is not a sagemath problem but an interesting mathematical question, right?

I write two or three equations, just to see if the answer is within pen's reach

2019-12-31 14:45:22 +0200 received badge  Teacher (source)
2019-12-31 09:49:06 +0200 answered a question Using piecewise-defined functions for recursive integer sequence

r = 10

m = 2

def fonction_n(k):

if k == 0:

    return r//m

return 10 * (fonction_n(k-1) -  fonction_q(k-1) * m)

def fonction_q(k):

if k == 0:

    return 0

return fonction_n(k)//m

It is possible to derecursify this functions

happy new year

2019-12-30 14:58:43 +0200 commented answer not evaluating expression

Great!!

Happy new year to you

2019-12-29 15:13:33 +0200 asked a question not evaluating expression

var("x",domain=RR) e =2x+1 f = 3x+2 (e+f==e+f).show()

reply: 5x+5=5x+3 of course.

But I would like to have 2x+3+5x+1=5x+3 Is there somethink like e.unevaluate()?

big thanks and happy new year to the whole sagemath community

2019-12-24 10:09:41 +0200 commented answer equality with integer exponents

Indeed. But here I know the answer; in general, it will be necessary to show a lot of experience in the manipulation of symbolic expressions before concluding.

2019-12-23 17:22:48 +0200 asked a question equality with integer exponents

n = var("n",domain = ZZ) assume(n>0) bool(3^(2*n) == (3^2)^n )

reply: False

Why?

Big thangs

2019-12-23 16:53:36 +0200 commented answer unicode coding

You are absolutely right ... but it does not work better, while in Python 3 it works very well Big thangs

2019-12-20 15:35:49 +0200 commented answer unicode coding

not better unfortunately

2019-12-20 10:49:42 +0200 commented answer unicode coding

sorry but utf-8, utf_8, UTF-8 ou UTF_8 does not work on windows... (# -- coding= -- on the first line) something else to had?

big thanks

2019-12-19 10:35:23 +0200 asked a question unicode coding

# -*- coding = UTF-8 -*-

does not work ?

Big thanks

2019-12-19 09:42:52 +0200 commented answer factorize symbolic expression

ok I undersatnd....

2019-12-18 10:33:25 +0200 commented answer factorize symbolic expression

Thanks for the replay. A little bit heavy for a simple factorization of an expression... Any particular reason for this restriction of the format method? Big thanks anyway

2019-12-17 17:16:04 +0200 received badge  Student (source)
2019-12-16 10:22:28 +0200 answered a question factorize symbolic expression

that's the problem... Thank to you

2019-12-15 22:35:31 +0200 asked a question factorize symbolic expression

(ax+bx).factor()=x(a+b) but (2a+2b).factor()=(2a+2b) how to obtain 2(a+b) ?

Thanks in advance...